what command is used to create a table by copying the
structure of another table including constraints ?

Answer Posted / thirumal

select * into <new table name> from < old tablename> where
<any false condition>
ex: new table name "emp"
Old table name "dept"
select * into emp from dept where 2=5
then it will display only the structure of the old
table,not the data

Is This Answer Correct ?    3 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why should I use postgresql?

553


How delete all records from table in sql?

546


What is cross join example?

542


How can you fetch common records from two tables?

579


What is the difference between function, procedure and package in pl/sql?

551






what is data integrity? : Sql dba

587


What is the command used to fetch first 5 characters of the string?

876


Does oracle roll back the transaction on an error?

524


how to convert character strings to numeric values? : Sql dba

562


What are the two virtual tables available at the time of database trigger execution?

622


What is rowtype?

554


What is a dirty read sql?

468


What are sql ddl commands?

536


What are the types of subqueries?

566


Why do we use subquery?

477