What are default values and auto-increment/identity columns?
Model answer
DEFAULT supplies a value when none is given (for example CURRENT_TIMESTAMP). Auto-increment or identity columns generate ids automatically: AUTO_INCREMENT in MySQL, SERIAL or GENERATED ... AS IDENTITY in PostgreSQL, AUTOINCREMENT in SQLite. Gaps in ids are normal after rollbacks and deletes.
Learn this topic
INSERT, UPDATE and DELETE: Change Data Safely in the course SQL for Beginners: Learn Databases Step by Step.
Sign in to add your own answer.