Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.33/5 (2 votes)
See more:
Here my code...

delete s. *, dm. * from StaffMaster s inner join Device_StaffFP dm on s.UserIDN=dm.UserIDN where s.UserIDN='19'

when i try do this i got error...

thank you..
Posted

You can either use a stored procedure for doing this or you can use delete cascade foreign keys.

you can check similar solved question Here
 
Share this answer
 
v2
Hi,

Check this...


Single SQL Query to delete records in two tables[^]

Mainly for Constraints..


Hope this will help you.


Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900