Click here to Skip to main content
15,885,952 members

Delete row from two sql tables that join together

Revision 3
There are two tables:

VB
Table1 : UserID Name Job
Table2 : BookID Book Car UserID


I load these two tables in one wpf datagrid:

C#
da.SelectCommand = new SqlCommand("select Table1.UserID, Table1.Name, Table1.Job, Table2.Book, Table2.Car from Table1 inner join Table2 on Table1.UserID = Table2.UserID");


How can delete a row from Table2 based on BookID?
thanks
Posted 19-Jan-13 17:54pm by M.H. Shojaei.