Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, what is wrong with my query: ALTER TABLE contact ADD CONSTRAINT contact_FK_1 FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE SET NULL; the following error ocures: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'SET'. Thanks Metal
Post Follow-up to this messageAre you using SQL Server 2005? ON DELETE SET NULL was not available in 2000. Is the database in Compatibility Level 90? If it is anything lower (older) it would not accept that syntax. Roy Harvey Beacon Falls, CT On Sun, 26 Nov 2006 08:37:00 +0100, "Metal" <javajohn@o2.pl> wrote: >Hi, > >what is wrong with my query: >ALTER TABLE contact ADD CONSTRAINT contact_FK_1 FOREIGN KEY (company_id) >REFERENCES company(id) ON DELETE SET NULL; > >the following error ocures: >Msg 156, Level 15, State 1, Line 1 >Incorrect syntax near the keyword 'SET'. > >Thanks >Metal
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread