How to create a table from a select
sometime happen that you need to create a table from a query…
now we can assume that you have old_table and you wanna build a copi of entire data into another table new_table…
This operation is not a standard sql but a lot DataBases can do this :
in Oracle you can do this like “create table as” :
1 2 3 |
create table new_table as select * from old_table |
in MS Sql Server with this command :
1 2 3 |
select * into new_table from old_table |
in mySql you can do this like (the only difference between Oracle is the “as” statement) :
1 2 3 4 |
create table new_table as select * from old_table |
Firebird don’t support this operation
for Oracle and Interbase we need to extend to temporary dynamic tables, and transactions interactions … for those we need an extension of this article…
i know that is simple, but only for reminder..
tnkx
i