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 the difference between a database and a relational database?
What is exception? What are the types of exceptions?
What is sql and explain its components?
How do I partition a table in sql?
Can we connect to postgresql using sql developer?
How do you create an update query?
What is a column in a table?
what are the 'mysql' command line arguments? : Sql dba
What type of database is sql?
What is sql in oracle?
What is the plv (pl/vision) package offers?
Why we use cross join?
Why do we need cursors in pl sql?
What is the maximum database size for sql express?
What is bind variable in pl sql?