So, I create a table as follows:
CREATE TABLE IF NOT EXISTS Lists ( wID integer, ltitle text, llink text, units text, date text, ListsID integer, new integer , CONSTRAINT Lists_pk PRIMARY KEY (ListsID)) To insert data I do (this is in Python): x = dcur.execute('insert into Lists values (?, ?, ?, ?, ?, ?)', (123, 'YouTube Videos', 'http://www.youtube.com', 'views', '10/14/08', 4)) And I get: OperationalError: table Lists has 7 columns but 6 values were supplied I only supplied 6 values because, according to the sqlite documentation: "If a table contains a column of type INTEGER PRIMARY KEY, then that column becomes an alias for the ROWID. You can then access the ROWID using any of four different names, the original three names described above or the name given to the INTEGER PRIMARY KEY column. All these names are aliases for one another and work equally well in any context. "When a new row is inserted into an SQLite table, the ROWID can either be specified as part of the INSERT statement or it can be assigned automatically by the database engine." So, if I want the engine to automatically assign the ROWID, do I have to specify the PK column or not? If the former, how do I get the table to automatically assign the ROWID? Thanks. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users