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

Answer Posted / ram

In oracle

Create table newtablename as select * from oldtablename
where 1=2
(any false condition if condition true it copies data from
table it applicable for both oracle & sqlserver)

In Sql server

select * into newtablename from oldtablename where 1=2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bind variable in pl sql?

532


What is snowflake sql?

582


Can a key be both primary and foreign?

510


how to convert character strings to dates? : Sql dba

525


How much does sql certification cost?

548






What are the two different parts of the pl/sql packages?

568


What is information schema in sql?

584


what is 'mysqlcheck'? : Sql dba

577


Can a table contain multiple foreign key’s?

579


Can one improve the performance of sql*loader? : aql loader

587


What are the sql versions?

522


What are local and global Indexes and where they are useful.

930


How to get each name only once from an employee table?

611


Why stored procedure is better than query?

512


how to present a past time in hours, minutes and seconds? : Sql dba

568