Re: [sqlite] RE: Data Types
When a table is created with "create table as select ...", version 2.8 does not use any type info from the old table when creating the new one; all it uses are the column names. Version 3 uses the type info but doesn't pick up at least some of the constraints. You can verify all this with "pragma table_info()". If you really want to duplicate a table, get the table's sql from sqlite_master, change the table name, and execute that to create your new table; then fill the new table with "insert ... select ...". Regards
Re: [sqlite] RE: Data Types
Drew, Stephen wrote: This seems to be the result of creating a table as: CREATE TABLE temp AS SELECT * FROM another_table Surely the datatypes of the original query (SELECT * FROM another_table) should be used for the new table temp? See http://www.sqlite.org/cvstrac/tktview?tn=521. The problem is fixed in version 3.0. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
[sqlite] RE: Data Types
Hello again, Can anyone answer these simple questions for me? Why is the SHOW_DATATYPES pragma not mentioned on the SQL syntax page under the PRAGMA keyword section? Do I have to execute the pragma per transaction? If not, why I am intermittently not getting the data types? Thanks, Steve From: Drew, Stephen Sent: Monday, July 19, 2004 7:09 PMTo: '[EMAIL PROTECTED]'Subject: Data Types Hi there, I am using the PRAGMA command "SHOW_DATATYPES=on". However, not all of my queries return the datatypes. Has anyone else experienced this problem? Regards,Steve