"Dennis Volodomanov" <[EMAIL PROTECTED]> writes:
> So, "CREATE TABLE AS" will basically duplicate the table that I have (if
> I say for example, "CREATE TABLE AS myNewTable AS SELECT * FROM
> myOldTable")? Sounds good if that's true :-)
You have one too many "AS" in your example. (No "AS" between CREATE TABLE and
the table name. Try it this way:
CREATE TABLE myNewTable AS SELECT * FROM myOldTable;
In sqlite 2.8.* you lose the field types (which were just comments in the 2.8
series anyway). I suspect that in 3.0.* the field types are retained, but I
haven't tested it. You can verify with something like this:
% sqlite :memory:
SQLite version 2.8.16
Enter ".help" for instructions
sqlite> create table x (i integer);
sqlite> create table y as select * from x;
sqlite> .dump
BEGIN TRANSACTION;
create table x (i integer);
CREATE TABLE y(i);
COMMIT;
sqlite>
Derrell