Home > Archive > Microsoft SQL Server forum > September 2005 > Delete relationship?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Delete relationship?
Steve

2005-09-20, 11:23 am

How do I delete a relationship between tables in SQL Server 7.0?

I previously had a relationship between two tables, but I renamed the field
and table of one of the tables and the old relationship still points to the
old field name and table. How do I remove the defunct relationship?

It doesn't show in my diagram because the old table no longer exists (well
it does but it's been renamed).


JT

2005-09-20, 11:23 am

Referential integrity between tables is implemented using constraints. Try
this:
alter table <table_name> drop constraint <constraint_name>

"Steve" <steve@hello.com> wrote in message news:43301ef3_1@x-privat.org...
> How do I delete a relationship between tables in SQL Server 7.0?
>
> I previously had a relationship between two tables, but I renamed the
> field and table of one of the tables and the old relationship still points
> to the old field name and table. How do I remove the defunct relationship?
>
> It doesn't show in my diagram because the old table no longer exists (well
> it does but it's been renamed).
>



Tibor Karaszi

2005-09-20, 11:23 am

ALTER TABLE tblname DROP CONSTRAINT constraintname

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"Steve" <steve@hello.com> wrote in message news:43301ef3_1@x-privat.org...
> How do I delete a relationship between tables in SQL Server 7.0?
>
> I previously had a relationship between two tables, but I renamed the field
> and table of one of the tables and the old relationship still points to the
> old field name and table. How do I remove the defunct relationship?
>
> It doesn't show in my diagram because the old table no longer exists (well
> it does but it's been renamed).
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com