How create table structure only from tableA to TableB if
TableA have some data?
Answers were Sorted based on User's Feedback
Answer / sunny
to copy only the structure
select * into table2 from table1 where 1=2
to copy the table along with the records
select * into table2 from table1 where 1=1
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / karthik
Create table emp1
as
select * from emp
where 1=2
It will give the structure of the table.
Is This Answer Correct ? | 3 Yes | 3 No |
Answer / mits
Create table newtablename
from oldtablename
where 1=2
Is This Answer Correct ? | 4 Yes | 6 No |
What are the different acid properties?
What is the diff between Dynamic queries and static queries
1 Answers CGG, ICS Integrated Computer Solutions,
Which are ddl commands?
To which devices can a backup be created and where should these devices be located? : sql server management studio
How do we know if any query is retrieving a large amount of data or very little data?
How to use union to merge outputs from two queries together in ms sql server?
what is checksum in sql server.........???
How you can find out if an index is useful to the optimizer?
List down some advantages of sql stored procedure?
How to Execute an Operating System Command From Within SQL Server ?
UPDATE statement can on a single table or on the multiple table?
can an automatic recovery be initiated by a user? : Sql server administration