Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have 3 tables (a table,b table,c table)

in 'a' Table :- columns are akey as primarykey int, aname as varchar,

in 'b' Table :- columns are bkey as primarykey int, akey(fkey) int , address as varchar(100),

in 'c' Table :- columns are ckey as primarykey, bkey(fkey) int, city as varchar(20)

here i want to delte the data from a table, but not able to delete bcoz i'm getting below error:-

The DELETE statement conflicted with the REFERENCE constraint

for this i want to use "delete cascade query" can any one help to how use thie one with example
Posted

1 solution

You would need to specify "ON DELETE CASCADE" on the foreign key constraint when creating the table. You can check google on this and check it out.

Good luck!
 
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