Search code examples
sql-serversqliteauto-increment

Is there a set identity_insert on equivalent for SQLite?


In TSQL there is

SET IDENTITY_INSERT ON;

is there a functional equivalent in SQLite?


Solution

  • SQLite always allows inserting a value into the primary key column; automatically generated values are used only when the inserted value is NULL (explicitly or omitted).

    For details, see the documentation.