nem.ec

Programming Information Security Recipes Personal Code Snippets

Create a clustered primary key in a SQLite table

Choose the column of a clustered index in a SQLite table instead of using the in-built rowid

https://sqlite.org/withoutrowid.html

CREATE TABLE "SAMPLE_TABLE" (
    "file_id" TEXT PRIMARY KEY,
    "inserted_date" DATETIME DEFAULT CURRENT_TIMESTAMP
) WITHOUT ROWID