1 --首先创建一个表 2 CREATE TABLE [dbo].[abcd]( 3 [id] [int] IDENTITY(3,4) NOT NULL, 4 [NAME] [varchar](50) NULL, 5 [remark] [varchar](200) NULL 6 ) ON [PRIMARY] 7 8 9 --获取起始值10 SELECT IDENT_CURRENT('abcd')--起始值11 --获取增量12 SELECT IDENT_INCR('abcd')13 --判断 自增列14 SELECT syscolumns.name,IsIncrementColumn = cast(CASE syscolumns.status15 WHEN 128 THEN 116 ELSE 017 END AS bit) FROM syscolumns18 WHERE syscolumns.id = ( SELECT id19 FROM sysobjects20 WHERE name = 'abcd'21 )