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

Netside
  • 80
  • 2
  • 9

1 Answers1

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.

Leon Yue
  • 15,693
  • 1
  • 11
  • 23