Skip to content

[Req] Support for CREATE SEQUENCE #4

@ArsenShnurkov

Description

@ArsenShnurkov

SQL 2003 standart introduces the way to create sequences to insert their values into PK columns.

the syntax (BNF-like) is described in ISO/IEC 9075-2:2003 (E)
paragraph 11.62

my simplified proposition:

CREATE SEQUENCE <sequence_name>
 [AS [built_in_integer_type]]
 [START WITH <constant>]
 [INCREMENT BY <constant>]

paragraph 6.13

my simplified proposition:

NEXT VALUE FOR <sequence_name>

So, to create a new record, the following sequence of SQL commands is possible:

  1. Declare variable (see issue #6)
  2. Generate new sequence number (to variable)
  3. Insert this number into record (from variable)
  4. Return this number (from variable) to the client (to EF for example)

So, what do you think about supporting this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions