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 the difference between inner join and outer join?

618


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

667


what is msql? : Sql dba

664


What are different types of triggers?

658


What is rtm in testing?

659






how to do backup entire database? : Transact sql

771


What is the difference between an inner and outer join?

624


What are all the ddl commands?

752


What are stored procedures in mysql?

670


How would you convert date into julian date format?

706


What are the types of optimization?

604


What are functions in sql?

580


Explain what is sql?

709


Can you selectively load only those records that you need? : aql loader

692


What does the file extension accdb stand for?

637