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 the mutating table and constraining table?

563


Why stored procedure is faster than query?

519


what is sub-query? : Transact sql

599


What is the difference between local variables and global variables?

615


Can we use threading in pl/sql?

521






What is data manipulation language?

702


Does pl/sql support create command?

578


How do I make sql search faster?

560


How do I create a sql script?

542


how to use myisamchk to check or repair myisam tables? : Sql dba

509


what are the types of join and explain each? : Sql dba

534


what is table? : Sql dba

573


What is the left table in sql?

519


How do I delete a trigger?

546


Why do we use procedures?

519