A Drent wrote:
> a.. When new tables are created using CREATE TABLE ... AS SELECT ...
> the datatype of the columns is the simplified SQLite datatype (TEXT,
> INT, REAL, NUMERIC, or BLOB) instead of a copy of the original
> datatype from the source table.
>
> I don't know why this has been done

Because, in general, there ain't no such thing as a "source table". 
Consider:

create table newTable as
select 1, a+1, b+c, case when d then e else f end
from oldTable1 join oldTable2 on someCondition;

> If this is necessary why not then just allow the
> primitive datatypes within the 'create'?

I'm not sure I understand. You can use any datatypes you want in CREATE 
TABLE, just not in CREATE TABLE AS SELECT. If you need a table with 
particular column types, create it the way you want, then use INSERT ... 
SELECT to populate it.

Igor Tandetnik



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

Reply via email to