SQL Serve create sequence

Source: Internet
Author: User

Oracle has sequence functionality, and SQL Server-like functionality is implemented using the identity column, but with great limitations.

In 2012, Microsoft finally increased the sequence object, the function and performance have been greatly improved.

SQL Server 2012 Sequence

Configuration Properties

1. Query the next value of a sequence

Select Next value for Mysequ

2. Get the properties of a sequence

SELECT * from sys.sequences where name= ' mysequ '

3. Sequences can be shared

4. Sequence can be re-set the initial value

5. Can be used directly in the query

6.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.