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 2005 Forums
 Transact-SQL (2005)
 removing foreign key restriction

Author  Topic 

pssheba
Yak Posting Veteran

95 Posts

Posted - 2008-04-13 : 06:39:20
Hi everyone,
My first table has a column named "customer" that is directed to "customers" table "id" column as foreign key.
I wanted to change "id" name so i wanted to delete it and create another column of another name but i cannot delete that column because it is attached as fk to another table.
How can i remove th fk constraint ?
Thanks.

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-04-13 : 08:24:58
look in Books Online at ALTER TABLE .... DROP CONSTRAINT ....

Em
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-13 : 09:04:09
or even:-
[url]http://doc.ddart.net/mssql/sql70/aa-az_5.htm[/url]
Go to Top of Page

pssheba
Yak Posting Veteran

95 Posts

Posted - 2008-04-14 : 03:32:46
quote:
Originally posted by visakh16

or even:-
[url]http://doc.ddart.net/mssql/sql70/aa-az_5.htm[/url]


Thanks
Go to Top of Page
   

- Advertisement -