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 a procedure in pl sql?
What schema means?
Can we use pl sql in sql server?
What is a temporal table?
How can we link a sql database to an existing android app?
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
What are packages in pl sql and also explain its advantages?
What is dense_rank?
what is an extent ? : Sql dba
Is id a reserved word in sql?
What are tuples in sql?
What is delete command in sql?
Write a unique difference between a function and a stored procedure.
how to show all tables with 'mysql'? : Sql dba
what are the advantages a stored procedure? : Sql dba