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
What is case function?
What is range partitioning?
Can sql developer connect to db2?
What is join view in sql?
how to convert dates to character strings? : Sql dba
What is the use of function "module procedure" in pl/sql?
Explain character-manipulation functions?
what is online transaction processing (oltp)? : Sql dba
Write the command to remove all players named sachin from the players table.
What are sql procedures?
what is primary key? : Sql dba
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
Is grant a ddl statement?
Is big data nosql?
What is a heap in sql?