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

Answer Posted / anji

create table table_name as ( select * from old_table where 1=2)

from this query we can create a new table structure from old
table structure with out data

Is This Answer Correct ?    26 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we create a trigger on view?

579


What is the use of index in sql?

660


how to get a list of all tables in a database? : Sql dba

596


how to drop an existing view in mysql? : Sql dba

693


Compare sql & pl/sql

688






How will you distinguish a global variable with a local variable in pl/sql?

713


Which join is like inner join?

668


what are the type of locks ? : Sql dba

633


How do you define a foreign key?

624


Enlist the characteristics of pl/sql?

1352


explain the difference between delete , truncate and drop commands? : Sql dba

646


Does asenumerable execute the query?

681


what is a control file ? : Sql dba

659


How many clustered indexes can be created on a table?

681


Can we join same table in sql?

649