File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes SQL Query for two tables joining Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "SQL Query for two tables joining" Watch "SQL Query for two tables joining" New topic

SQL Query for two tables joining

Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
I have two tables A and B
Table A has two records one for Amitabh and the other for Sharukh
Table B has records of various cars posessed by Amitabh and Sharukh.....

My question is what will be the sql Query in order to delete Sharukh record in both the table... i want to delete Sharukh membership details from Table A & simultaneously delete all the rows of Table B where the cars owner is Sharukh .. Primary key in Table A is an id and in Table B has a mem_id column which is same as that of Table A id ... What is the SQL Query?

Thank you friends..
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62269

Please take the time to choose the appropriate forum for your posts. This one has been moved to a more approriate forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: SQL Query for two tables joining