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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the disadvantages of using querystrings to send data from one page to another?

771


Why SQL Agent is used?

799


What is bit data type?

797


Tell me what is normalization? Explain different forms of normalization?

767


Explain how you can configure a running aggregate in SSRS?

131


What is the standby server?

682


How to create new tables with "create table" statements in ms sql server?

763


how would you store your query in an SSRS report or a Database server?

142


What does the update command do?

788


What is left outer join in sql server joins?

697


What is query cost in sql server?

750


Explain triggers in sql?

718


What is a result set object returned by odbc_exec()?

730


Write a code to select distinct records without using the DISTINCT keyword.

851


What are trace flags and mention a few common trace flags used with sql server?

753