what command is used to create a table by copying the
structure of another table including constraints ?
Answer Posted / a.jyothsna
I know copying the structure of one table but not the
constraints also:
create table newtablename as
select * from oldtablename;
with the above query total data will also be copied.
But to copy only the structure.
create table newtablename as
select * from oldtablename
where 1=2;
| Is This Answer Correct ? | 20 Yes | 6 No |
Post New Answer View All Answers
What is a data definition language?
What are the possible values that can be stored in a boolean data field?
What is localdb mssqllocaldb?
Show code of a cursor for loop.
What is pl/sql table? Why is it used?
what are the different type of sql's statements ? : Sql dba
What is a full join sql?
What is cost in sql execution plan?
how can you create an empty table from an existing table? : Sql dba
What are two statement types in sql?
What is constant in pl sql?
what is user defined functions? : Sql dba
How do we accept inputs from user during runtime?
What is the difference between truncate and drop statements?
what is a trigger? : Sql dba