Identity column of a table is a column whose value increases automatically. The value in an identity column is created by the server. A user generally cannot insert a value into an identity column. Identity column can be used to uniquely identify the rows in the table.
IDENTITY [( seed, increment)] Seed: Starting value of a column. Default value is 1. Increment: Incremental value that is added to the identity value of the previous row that was loaded. The default value 1.
The ‘ID’ column of the table starts from 1 as the seed value provided is 1 and is incremented by 1 at each row.
The ‘ID’ column of the table starts from 1 but is incremented by 2 as the increment value is passed as 2 while creating the ‘IDENTITY’ Column.
- Mean and Mode in SQL Server
- SQL Server | SERVERPROPERTY()
- SQL SERVER | IN Condition
- Difference between MySQL and MS SQL Server
- Allow only alphabets in column in SQL Server
- Comparisons between Oracle vs SQL Server
- SQL SERVER | Conditional Statements
- SQL Server | STUFF() Function
- SQL Server Mathematical functions (SQRT, PI, SQUARE, ROUND, CEILING & FLOOR)
- Top 10 High Paying Jobs That Demand SQL
- Count the number of a special day between two dates by using PL/SQL
- MySQLi Procedural Functions
- MySQL | CONNECTION_ID( ) Function
- MySQL | CAST( ) Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.