dimanche 3 mai 2015

INTEGER PRIMARY KEY NOT NULL constraint and rowid alias

From http://ift.tt/1xuL6UL

if a rowid table has a primary key that consists of a single column and the declared type of that column is "INTEGER" in any mixture of upper and lower case, then the column becomes an alias for the rowid.

My question is: will this behaviour persist if I add a NOT NULL constraint ?

Example 1:

CREATE TABLE t(x INTEGER PRIMARY KEY NOT NULL, y, z);


Example 2:

CREATE TABLE t(x , PRIMARY KEY ( y INTEGER NOT NULL, z INTEGER NOT NULL))


What about the second example, what column (if any) will be an alias for rowid ?

Aucun commentaire:

Enregistrer un commentaire