Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 create table with on delete cascade

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-01 : 09:52:08
sanjayanthan writes "I am using sql server 2000

i have two table one parent and child i want to use on delete cascade but it is giving error like that

Server: Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'on'.

can any one test and reply me

CREATE TABLE parent(
parentid int primary key,
parentname varchar(30),
parentdob datetime)

CREATE TABLE child(
childid int primary key,
childname varchar(30),
childdob datetime,
parentid int constraint chd1 references parent(parentid) on delete cascade on update cascade)"
   

- Advertisement -