On Thu, 21 Sep 2017 04:07:36 -0400,
Papa <[email protected]> wrote:
Just a side-note:
> wapstr += L"id INT PRIMARY KEY NOT NULL, ";
"INT PRIMARY KEY" is not enough to create an alias for ROWID,
that only happenes with "INTEGER PRIMARY KEY" :
~ $ sqlite3 test.sqlite
SQLite version 3.21.0 2017-08-14 01:33:07
Enter ".help" for usage hints.
sqlite> create table t1 (id INT PRIMARY KEY NOT NULL, tx
TEXT);
sqlite> create table t2 (id INTEGER PRIMARY KEY NOT NULL, tx
TEXT);
sqlite> pragma table_info(t1);
0|id|INT|1||1
1|tx|TEXT|0||0
sqlite> pragma table_info(t2); -- looks the same, but:
0|id|INTEGER|1||1
1|tx|TEXT|0||0
sqlite> insert into t1 (id,tx) values (3,'t1');
sqlite> insert into t2 (id,tx) values (3,'t2');
sqlite> select ROWID,id,tx from t1; -- ROWID not aliased
1|3|t1
sqlite> select ROWID,id,tx from t2; -- aliased as intended.
3|3|t2
sqlite>
I'm afraid I don't have an answer to your original question.
--
Regards,
Kees Nuyt
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users