Primary keys - the basics
Single-column primary keys
Multicolumn primary keys
Auto-increment columns and sequences
19. Auto-increment with IDENTITY
Revision

Instruction

Success! Take a look at the table - the value for the column id has been generated automatically. The database takes care of numbering in case of IDENTITY columns. Isn't that great?

Exercise

Add a few more rows to the table and see for yourself how the consecutive numbers are generated for the column id.

Insert rows with Run and check code button. When you're done with the exercise, press the I'm done. Next exercise button.

Console

Code editor

Result

TableConsole