Click here to Skip to main content
14,239,876 members
Rate this:
Please Sign up or sign in to vote.
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

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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!

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100