How create table structure only from tableA to TableB if
TableA have some data?

Answers were Sorted based on User's Feedback



How create table structure only from tableA to TableB if TableA have some data?..

Answer / anand.kv

SELECT TOP 0 * INTO tableB FROM tableA

Is This Answer Correct ?    16 Yes 0 No

How create table structure only from tableA to TableB if TableA have some data?..

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

How create table structure only from tableA to TableB if TableA have some data?..

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

How create table structure only from tableA to TableB if TableA have some data?..

Answer / mits

Create table newtablename
from oldtablename
where 1=2

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More SQL Server Interview Questions

How to provide values to user defined function parameters?

0 Answers  


How do you create type- insensitive operator?

0 Answers   EXL,


What are the purpose of Normalisation?

0 Answers   HCL,


Which are new data types introduced in sql server 2008?

0 Answers  


How to use wildcard characters in like operations in ms sql server?

0 Answers  


Can you pass expressions to function parameters?

0 Answers  


How do SQL server 2000 and XML linked?

2 Answers  


How to create view in stored procedure sql server?

0 Answers  


Where are magic tables stored ? Is it in the same database where it is created ?

4 Answers  


wat is the main diff between sql server 2000and sql server 2005

6 Answers   Jade Software,


What are the properties of the transactions?

0 Answers  


What is GUID in sql server?

0 Answers   BirlaSoft,


Categories