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 sql*loader control file?
how to use 'mysql' to run sql statements? : Sql dba
How do I run a sql query?
Which is the correct statement about truncate and delete?
what is sub-query? : Transact sql
how to increment dates by 1 in mysql? : Sql dba
What is structural independence and why is it important?
What is sql comments?
How long does it take to learn pl sql?
What is the most important ddl statements in sql are?
What is range partitioning?
What is a field in a database?
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba
Is microsoft sql free?
Enlist the data types that can be used in pl/sql?