The table is created with no rows if the query returned no rows. : Copy Table « Table « Oracle PL / SQL






The table is created with no rows if the query returned no rows.

    
SQL> CREATE TABLE Y AS SELECT * FROM X WHERE 1 = 2;
SQL>

   
    
    
    
  








Related examples in the same category

1.Use copy command to create new table
2.Create a copy table and insert value to it
3.Copying selected columns from another table
4.Copying selected columns from multiple tables
5.CREATE Table from another table with consitions
6.Duplicate some or all of the data in one table under a different table name
7.Create a copy table with primary key setting
8.Copying table
9.Copying table structure not data
10.Create table as select * from another
11.Create a copy table from all_objects
12.Creating from Another Table