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 |
How to provide values to user defined function parameters?
How do you create type- insensitive operator?
What are the purpose of Normalisation?
Which are new data types introduced in sql server 2008?
How to use wildcard characters in like operations in ms sql server?
Can you pass expressions to function parameters?
How do SQL server 2000 and XML linked?
How to create view in stored procedure sql server?
Where are magic tables stored ? Is it in the same database where it is created ?
wat is the main diff between sql server 2000and sql server 2005
What are the properties of the transactions?
What is GUID in sql server?