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)
 Remove foreign key Constraint

Author  Topic 

melon.melon
Yak Posting Veteran

76 Posts

Posted - 2009-06-10 : 03:16:10
Hi,

How do i remove foreign key constraint from the table created ?


GO
ALTER TABLE [dbo].[tbDemurrage] WITH CHECK ADD CONSTRAINT [FK_tbDemurrage_tbVes] FOREIGN KEY([VesselName])
REFERENCES [dbo].[tbVes] ([VesselName])
GO
ALTER TABLE [dbo].[tbDemurrage] CHECK CONSTRAINT [FK_tbDemurrage_tbVes]

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-06-10 : 03:16:49
ALTER TABLE [dbo].[tbDemurrage]
DROP CONSTRAINT [FK_tbDemurrage_tbVes]


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

melon.melon
Yak Posting Veteran

76 Posts

Posted - 2009-06-10 : 03:22:49
Thanks!
Go to Top of Page
   

- Advertisement -