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 the primary key?
How do I create a memory optimized filegroup?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
What does := mean in pl sql?
What is a record in a database?
What is pl sql and why it is used for?
Is sql workbench free?
what is self-join? : Sql dba
What is sql performance tuning?
What is asqueryable?
How do you update f as m and m as f from the below table testtable?
Is record in pl sql?
What is the difference between an inner and outer join?
Can ddl statements be used in pl/sql?
What are instead of triggers?