select A.system_type_id,B.[name],A.is_identity from sys.columns A inner join sys.types B on A.system_type_id=B.system_type_id where A.object_id=object_id('表名') and A.[name]='列名'
查出某表中所有是自动编号的字段select [name] from sys.columns where object_id=object_id('表名') and is_identity=1
你好,我就是用SQL的,请问这个查询语句是什么?
on A.system_type_id=B.system_type_id
where A.object_id=object_id('表名') and A.[name]='列名'
where object_id=object_id('表名') and is_identity=1
谢谢,你这个是SQL2005以上的版本才执行的吧,我的SQL2000。