What Command Is Used To Create A Table By Copying The Structure Of Another Table

What Command Is Used To Create A Table By Copying The Structure Of Another Table


  • 28 Feb, 2012

    CREATE TABLE .. AS SELECT commandExplanation:To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following.CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2;If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.