Afficher un message
Vieux 16/06/2008, 10h29   #1
Csaba Gabor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SQLite and detecting AUTOINCREMENT

Is there any way to detect, based strictly on querying the
structure of a table/database whether there is an
AUTOINCREMENT set? That is to say, without analyzing
the original SQL creation statement, and without inserting
a new element into the database.

Consider:
CREATE Table myTab (col1 INTEGER AUTOINCREMENT PRIMARY KEY)
vs.
CREATE Table myTab (col1 INTEGER PRIMARY KEY)

I have not found a difference upon looking at:
SELECT * FROM sqlite_master WHERE type='table' AND name='myTab';
PRAGMA table_info('myTab');

The following is empty:
PRAGMA index_list('myTab');
so index_info does not seem relevant either.

Thanks,
Csaba Gabor from Vienna
  Réponse avec citation
 
Page generated in 2,29105 seconds with 9 queries