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 new_table AS
-
SELECT *
-
FROM old_table
-
-
in MS Sql Server with this command :
-
-
-
SELECT *
-
INTO new_table
-
FROM old_table
-
-
in mySql you can do this like (the only difference between Oracle is the “as” statement) :
-
-
-
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
