SQL insert失败时也会造成自增长字段加1

CREATE TABLE #test(id INT IDENTITY(1,1), NAME varchar(30))

 

INSERT #test(name)
SELECT '41545'
 SELECT   * FROM #test

INSERT #test(name)
SELECT  '9999999999999999999999999999999999999999999999999999999999999999999999'

 SELECT   * FROM #test
 
INSERT #test(name)
SELECT  'uiii'

 

 SELECT   * FROM #test

 

 

posted @ 2013-07-18 09:35  qanholas  阅读(584)  评论(1编辑  收藏  举报