SQL Server 2008 Express Edition - how to create a sequence

后端 未结 2 603
孤城傲影
孤城傲影 2021-01-12 22:40

I\'m using SQL Server 2008 Express Edition.

I wanna create a sequence with this code:

CREATE SEQUENCE Postoffice_seq
    AS bigint
    START WITH 1
          


        
2条回答
  •  走了就别回头了
    2021-01-12 23:23

    Sequence objects are new with SQL Denali, SQL Server 2012 Here is some sample codes http://www.kodyaz.com/sql-server-2012/number-of-sequences-in-sql-server-2012-using-sequence-objects.aspx for sequence objects in SQL 2012

    You can find a sequence table implemantation for SQL Server 2008 here : http://www.kodyaz.com/t-sql/sql-server-instead-of-trigger-with-sequence-table.aspx

提交回复
热议问题