Was this helpful?
Using CREATE TABLE...AS SELECT
The CREATE TABLE...AS SELECT syntax creates a table from another table or tables. The new table is populated with the set of rows resulting from execution of the specified SELECT statement.
When the CREATE TABLE statement includes an AS clause, specifying column names is optional unless two or more columns of the table would otherwise have the same name.
The column format cannot be specified when using CREATE TABLE...AS SELECT. The formats are copied from the source table columns specified in the subselect clause. The nullability attribute of a column in the new table is the same as the corresponding column in the source table.
Last modified date: 08/14/2024