Tito Ciuro wrote:
Hello Gerry,
Thanks for your answer. Your email is quite clear,
[Compliment redirected to D. R. Hipp, who wrote it originally]
but it still doesn't address a key point.
On 28 may 2004, at 23:07, Gerry Snyder wrote:
When you do a "SELECT *", the results contain only columns that are explicitly declared in the CREATE TABLE statement. If you have declared an INTEGER PRIMARY KEY column, then the rowid will appear under that column name. If there is no INTEGER PRIMARY KEY, then the rowid will not be a part of the result
So if you do not have an INTEGER PRIMARY KEY in your table declaration, the rowid will not be part of the saved data and will be lost when the table is reconstructed.
Say I construct a table like this:
CREATE TABLE t1(x INTEGER PRIMARY KEY, y);
and I extract the datatypes like this:
PRAGMA empty_result_callbacks = ON; PRAGMA show_datatypes = ON; SELECT * FROM t1 LIMIT 1;
I get the following datatypes:
x --> INTEGER y --> NULL
Tito,
I do not know whether this should be considered a bug. I don't get the data on fields this way. What I do, which gets the info you need, is:
sqlite> CREATE TABLE t1(x INTEGER PRIMARY KEY, y); sqlite> select sql from sqlite_master; CREATE TABLE t1(x INTEGER PRIMARY KEY, y) sqlite>
I hope this helps.
Gerry
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

