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 dml statement?
What are sql procedures?
What are different sql data types?
What is difference between group by and partition by?
What is pivot in sql?
How does stored procedure reduce network traffic?
How do you bind variables in pl sql?
What is database white box testing and black box testing?
Is there a 64 bit version of ssms?
What are database links used for?
how is myisam table stored? : Sql dba
Why do we use procedures?
what is the use of double ampersand (&&) in sql queries?
What is difference between stored procedures and application procedures?
Can we update views in sql?