I wanted to write a query to delete from x table and y table where object id=”123″ selecting object id from z table for the given name in ‘z’ table.How to write a sql query for this ?
Please let me know .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t delete from two tables at once. You need two delete statements.
I’ve used
INjust in case you have multiple objects with the same name. You may want to change that behaviour to suit your needs.