9.11. 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:

      1. CREATE TABLE orders_by_date
      2. COMMENT 'Summary of orders by date'
      3. WITH (format = 'ORC')
      4. AS
      5. FROM orders
      6. GROUP BY orderdate

      Create the table orders_by_date if it does not already exist:

      1. CREATE TABLE empty_nation AS
      2. SELECT *
      3. WITH NO DATA

      CREATE TABLE,