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 pl sql script?
How do you delete data from a table?
What are the different types of functions in sql?
what is try_catch block in procedure
Differentiate between pl/sql and sql?
What are the triggers associated with image items?
How do I install microsoft sql?
What are tuples in sql?
What does the hierarchical profiler does?
tell us something about heap tables. : Sql dba
Where the sql database files are stored?
What is sqlservr exe?
What is t-sql? : Transact sql
How can you select unique records from a table?
What sql does db2 use?