-
Get Relations betwwen the tables?
i want to write program that will return
the relations between the tables and its type (one to many,.....etc)
any help
Thanks in advance
-
You can query the system catalog get that information. In SQL Server it will be in syscontraints and sysobjects.
-
look at the logic behind sp_helpconstraint.
use master
go
sp_helptext sp_helpconstraint
go
example:
create table mytable (id int identity(1,1) constraint mytable_pk primary key,
name char(100) constraint mytable_def default ('NoName'))
go
sp_helpconstraint mytable
go
-
Thanks
Thanks For All
I will try This Solutions
Thanks again
Last edited by Mohammad Al Hus; 12-22-2003 at 05:51 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|