Sqlserver Sequence操作

USE [database_test]
GO


--创建SEQUENCE 
CREATE SEQUENCE defaultSequence
AS INT 
--设置开始行
START WITH 1 
--自增量
INCREMENT BY 1


--删除SEQUENCE 
DROP SEQUENCE [DefaultSequence]

--修改SEQUENCE 
ALTER SEQUENCE defaultSequence
--自增量
INCREMENT BY 3
 
SELECT NEXT VALUE FOR [DefaultSequence]

GO

 

posted @ 2015-12-02 11:10  xyzhuzhou  阅读(1590)  评论(1编辑  收藏  举报