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 do temporal tables work?
What does stand for in sql?
State some properties of relational databases?
What is the difference between a primary key and a unique key?
what is online transaction processing (oltp)? : Sql dba
What is 19 null in sql?
What are keys in sql?
Can we use pl sql in sql server?
What are tuples in sql?
Which is better cte or subquery?
Can unique keys be null?
How do I restart sql?
What are the most important characteristics of pl/sql?
What is cursor in pl sql?
How do I copy a table in sql?