| 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).
| |
|
| 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).
>
>
|
|
|
|