Sybase自增字段重置
JsLyn 2017-03-13 08:45:45 Sybase自增字段如何重置?
已尝试过下面两种方法:
1.
set identity_insert TestTable on
insert into TestTable (id,CreatedDate)values(1,getdate())
set identity_insert TestTable off
后面给表TestTable 插入数据仍然没有从1开始增长,而是从原来值开始增长。
2.
sp_chgattribute TestTable , 'identity_gap', 0,"1"
还有什么其他方法吗,或者是上面两种方法我哪里弄错?请各位帮帮忙!