0

I was looking at the examples and types while seeing how to use the SEQUENCE command in T-SQL (Azure SQL Database, SQL Server, etc.), but when it lists the types SEQUENCE can be configured as (INT, BIGINT, TINYINT, etc.), it mentions that its "type is sysname".

I know what sysname is (for the most part), but isn't SEQUENCE the type I specify (INT, BIGINT, etc.), and not sysname?

What am I missing? I feel like I'm missing something crucial to my understanding of all this.

Thanks. Sorry for the newbie question -- I know I am one right now.

Here is the page I'm speaking of: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-sequence-transact-sql?view=sql-server-ver15

4
  • 2
    The NAME of the SEQUENCE is of type sysname - not the values the SEQUENCE will return ..... (those are integer types) Commented Oct 19, 2019 at 6:57
  • 1
    From the docs: sequence_name - Specifies the unique name by which the sequence is known in the database. Type is sysname. Commented Oct 19, 2019 at 7:10
  • It's actually BIGINT (not INT) data type, but I get what you're saying. Noted. Commented Oct 19, 2019 at 9:01
  • BIGINT by default, I meant (sorry). Commented Oct 28, 2019 at 5:55

1 Answer 1

1

As marc_s said: The NAME of the SEQUENCE is of type sysname.

let me summarize:

  1. sequence_name: Specifies the unique name by which the sequence is known in the database. Type is sysname. Not the data type.
  2. The bigint the default data type of sequence if you don't set it.

enter image description here

Please don't mix the name type and the data type.

You can reference this documents:

  1. Sequence Numbers.
  2. Sequence Properties (General Page).

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Funny how things seem alien until we understand them and then they seem easy ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.