This interview questions are belongs to SQL Server and people are giving answers to Oracle. Please be sure to understand the question and give the answer. Wrong answer may spoil a person interview. Here is the right answer Without Data : select * into temp2 from temp where 1=2 With Data : select * into temp2 from temp Regards Sridhar
Above answer was rated as good by the following members: dhanu_mitra
RE: How will you copy the structure of a table without...
I think this should be more appropriate: Create table as select * from where 1 2;Here only the structure of the old table is copied and all the constraints imposed on the old table are not copied in the new table.This you can check by writing on SQL PROMPTSQL > desc SQL> desc Thanks!
RE: How will you copy the structure of a table without...
This interview questions are belongs to SQL Server and people are giving answers to Oracle. Please be sure to understand the question and give the answer. Wrong answer may spoil a person interview. Here is the right answer Without Data : select * into temp2 from temp where 1 2 With Data : select * into temp2 from temp Regards Sridhar
RE: How will you copy the structure of a table without...
create table NEWTable AS select * from OLDTABLE where 1 2can u used this command in Sql-Server -2005 i have used id but it is not workingwe can used this method as followingselect column name columnname into newtablename from oldtablename where 1 2