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 |
|
kamal.A
Yak Posting Veteran
70 Posts |
Posted - 2009-08-10 : 03:02:57
|
| Hi all,I have lot of sql server table in my application.. i want to get the primary key field in selected tables from programatically. so i need the query to get the primary key field in [articular table.pls help me,kamal |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-10 : 03:06:06
|
Here is a starterSELECT *FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE N 56°04'39.26"E 12°55'05.63" |
 |
|
|
kamal.A
Yak Posting Veteran
70 Posts |
Posted - 2009-08-10 : 03:08:06
|
| fine, thanks... |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-08-10 : 03:11:17
|
| Try this tooSELECT *FROM sys.objects where type='pk'Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
kamal.A
Yak Posting Veteran
70 Posts |
Posted - 2009-08-10 : 04:38:40
|
| thnx senthil.. |
 |
|
|
|
|
|