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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-15 : 20:44:17
|
| Joel writes "Where are the primary keys stored in the system tables...(other than using sp_pkeys [tableName])I want to do something like this:declare @var varchar(500)select @var = coalesce(@var + ',' + C.Name,C.Name)from sysObjects Ojoin syscolumns C on O.id=C.idwhere O.name = '[tableName]'[AND COLID = PRIMARY KEY]but I can't find the column/table that tells which columns make up the PRIMARY KEY!" |
|
|
|
|
|