Is there any way to find which filed is the unique ID field in a table by using some type of SQL... i.e:
select * from Test_Db..syscolumns c
join Test_Db..sysobjects o on c.id = o.id
where o.name = 'table_Test'
The above example will find all column names for a given table.
I m looking for something similar for quering which field is the Unique identifier in a table. By looking on the sysobjects etc of the SQL server 2000 looks like im lost for now.
anybody knows the answer Please help???
select * from Test_Db..syscolumns c
join Test_Db..sysobjects o on c.id = o.id
where o.name = 'table_Test'
The above example will find all column names for a given table.
I m looking for something similar for quering which field is the Unique identifier in a table. By looking on the sysobjects etc of the SQL server 2000 looks like im lost for now.
anybody knows the answer Please help???