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
What is bind variable in pl sql?
What is snowflake sql?
Can a key be both primary and foreign?
how to convert character strings to dates? : Sql dba
How much does sql certification cost?
What are the two different parts of the pl/sql packages?
What is information schema in sql?
what is 'mysqlcheck'? : Sql dba
Can a table contain multiple foreign key’s?
Can one improve the performance of sql*loader? : aql loader
What are the sql versions?
What are local and global Indexes and where they are useful.
How to get each name only once from an employee table?
Why stored procedure is better than query?
how to present a past time in hours, minutes and seconds? : Sql dba