I have just noticed this syntax which will simplify some table creation for me. However in some instances where I want to use it, I have a handy SELECT available, but I don't want to actually insert a row at that time. Testing with the shell, the following appears to work:
attach database ':memory:' as mem; create table mem.messages as select * from main.messages limit 0; and I get a new, empty, table with the same columns. Is this supposed to work in this way? The info at http://www.sqlite.org/lang_createtable.html doesn't say one way or the other. I'd like to take advantage of this, but not if it is undefined behaviour that just happens to work. -- Cheers -- Tim
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users