Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How can I delete a particular record in a DataBase where 6 tables are joined among each other.
Posted

Hi,
try this ...

for example :

SQL
Delete from a
inner join b on a.id = b.id
inner join c on a.id = c.id
inner join d on a.id = d.id
inner join e on d.id2 = e.id2
inner join f on e.id3 = f.id3
where b.type = '1' and d.number > 1000 and f.typevalue = 'x'
 
Share this answer
 
v4
hi,

set cascade property ............... So that any reference in table also deleted
 
Share this answer
 
v2

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