8.9. CREATE TABLE AS
The optional clause causes the error to besuppressed if the table already exists.
Create a new table with the results of a query and the given column names:
- CREATE TABLE orders_by_date
- COMMENT 'Summary of orders by date'
- WITH (format = 'ORC')
- AS
- FROM orders
- GROUP BY orderdate
Create the table orders_by_date
if it does not already exist:
- CREATE TABLE empty_nation AS
- SELECT *
- WITH NO DATA