Technical Article

hx_ShowIdentityColumns

,

List out all columns that are set as Identity columns in the database

DROP PROCEDURE hx_ShowIdentityColumns
go
/* Robert Vallee 01/11/2001
rvallee@hybridx.com
input:None
output:Table format
Desc:List out all columns that are set as Identity columns in the database.
Warnings: None.
*/
CREATE PROCEDURE hx_ShowIdentityColumns AS

select o.name as Table_Name, c.name as [Column_Name] 
from syscolumns c, sysobjects o
where c.id=o.id and (c.status & 128)=128
order by o.name,c.name

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating