Wow. Thanks. I see now that this is mentioned in the docs on the page for
the VACUUM statement. It really should be mentioned on the CREATE TABLE
page also where the rowid is explained. This is important information for
people who are learning SQLite and trying to figure out how to design
As someone who just started using SQLite without any previous background in
SQL, it was confusing to me. I did a search on nabble through this mailing
list and see now that I'm not the first person to ask about this issue.
IMO, it would be helpful to people new to SQLite to mention this in the
On Wed, Nov 17, 2010 at 04:36:12PM -0600, Bernard Ertl scratched on the wall:
> Is it not possible to reference the SQLite
> internal/default column for the RowID in a foreign key definition?
Even if you could, you don't want to do this.
Unless you define an ROWID alias (i.e. an INTEGER
On Wed, 17 Nov 2010 16:36:12 -0600, "Bernard Ertl"
>I'm getting a "foreign key mismatch" error with the following code:
>PRAGMA foreign_keys = ON;
>CREATE TABLE IF NOT EXISTS JobPlans (Name UNIQUE);
>CREATE TABLE IF NOT EXISTS Tasks (JobPlan_ID
I'm getting a "foreign key mismatch" error with the following code:
PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS JobPlans (Name UNIQUE);
CREATE TABLE IF NOT EXISTS Tasks (JobPlan_ID INTEGER NOT NULL REFERENCES
JobPlans(RowID) ON DELETE CASCADE, UID UNIQUE NOT NULL);
Mail list logo