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 get the definition of a stored procedure back?

0 Answers  


ehat is the default port no of sql 2000?

2 Answers   IBM,


What is ssl in sql server?

0 Answers  


how to insert the values in 5 table at a time with triggers . if u have any solution then co-operate me ?

1 Answers  


How to name query output columns in ms sql server?

0 Answers  






How to use subqueries in the from clause in ms sql server?

0 Answers  


What is the difference between functions and stored procedures?

0 Answers   Accenture,


What are triggers in ms sql server?

0 Answers  


Do you have any idea about the tcl commands?

0 Answers  


What are the differences between decimal and float in ms sql server?

0 Answers  


What is self contained sub query?

0 Answers  


What is the command used to check locks in microsoft sql server?

0 Answers  


Categories