Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

I've given up... Alter table... Add Constraint...
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



Report this thread to moderator Post Follow-up to this message
Old Post
Metal
12-01-06 12:14 AM


Re: I've given up... Alter table... Add Constraint...
Are 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

Report this thread to moderator Post Follow-up to this message
Old Post
Roy Harvey
12-01-06 12:14 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 08:50 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006