How can I create a table from another table without copying
any values from the old table?

Answer Posted / suresh babu

create table new_tn as select * from source_tn where 1=2;

This query will create a new table,which take structure of
the source table with out values.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is 'mysqlimport'? : Sql dba

565


How many types of cursors supported in pl/sql?

582


What are predefined functions in sql?

523


what are the different type of sql's statements ? : Sql dba

511


what is a unique key ? : Sql dba

535






What is the purpose of a secondary key?

500


what happens if you no create privilege in a database? : Sql dba

523


Which certification is best for sql?

528


Define concurrency control. : Transact sql

580


Explain the difference between rename and alias?

541


What is schema in sql?

507


Explain the difference between cursor declared in procedures and cursors declared in the package specification?

568


what is isam? : Sql dba

564


What is orm in sql?

527


Is drop table faster than truncate?

543