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 are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql
What is pl sql variable?
How to add, remove, modify users using sql?
How is a process of pl/sql compiled?
How do you get column names only for a table (sql server)?
Does sql view stored data?
What is scalar function?
Why having clause is used in sql?
What is query optimization in sql?
what is 'trigger' in sql? : Sql dba
how to get a list of indexes of an existing table? : Sql dba
What are the parts of a sql statement?
Can we commit inside a trigger?
Is sql a programming?