I've been using mysql and I need to convert some code to use sqlserver. After some searching I found the equiv of "describe" for sqlserver. However, it doesn't return which column is the primary key. What command will return the primary key of a table? sp_column and sp_help procedures don't return that information...
edit: nevermind I found it. damn Microsoft has to do everything their own way.
sysobjects..
edit: damnit! no I haven't! I thought select * from sysobjects where xtype='pk'; would give me the column name. BUT NOPE! It know's there's a primary key column in the right key, but doesn't give me the column name.
edit: nevermind. geez. I had to stumble on a MS programmer's page to get the code to get a freaking primary column listing.
edit: nevermind I found it. damn Microsoft has to do everything their own way.
sysobjects..
edit: damnit! no I haven't! I thought select * from sysobjects where xtype='pk'; would give me the column name. BUT NOPE! It know's there's a primary key column in the right key, but doesn't give me the column name.
edit: nevermind. geez. I had to stumble on a MS programmer's page to get the code to get a freaking primary column listing.