what command is used to create a table by copying the
structure of another table including constraints ?
Answer Posted / saurabh agrawal
We can only copy the structure of the table and not the
constraints.
Syntax is as below:
Create table newtablename as select * from oldtablename;
In this way only NOT NULL constraint specified on any
column of the OLDTABLE will automatically get copied into
the NEWTABLE but other constraint will have to be created
manually.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
how to include character strings in sql statements? : Sql dba
What are the two different parts of the pl/sql packages?
What version is sql?
What is the difference between microsoft sql and mysql?
Which tcp/ip port does sql server run?
Which type of cursor is used to execute the dml statement?
Why truncate is faster than delete?
What is serial sql?
What is embedded sql what are its advantages?
What are pl/sql packages?
Can we rollback delete command?
What is trigger explain with example?
How to fix oracle error ora-00942: table or view does not exist
How to use sql*plus built-in timers?
What is pl sql commands?