Under certain conditions, VIEWs do not have rowid values.

Is there some recommended workaround that I can use to ensure that I always get 
non-null rowids with every VIEW?

CREATE TABLE one (i32 INTEGER);
INSERT INTO one VALUES(100);
INSERT INTO one VALUES(200);
CREATE VIEW v1 AS SELECT       * FROM one;
CREATE VIEW v2 AS SELECT rowid,* FROM one;   -- My current best guess


SELECT rowid,i32 FROM v1;
|100
|200

------------------- vs -----------------------

SELECT rowid,i32 FROM v2;
1|100
2|200


Thanks,
Ben
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to