Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to create table ??

Author  Topic 

companionz
Yak Posting Veteran

54 Posts

Posted - 2009-08-12 : 06:41:46
How can we implement something like this in SQL

create table test_table as select * from table

Thanks,
Sourav

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-08-12 : 06:46:45
select * into newtable from table

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-08-12 : 06:47:26
I think you want

SELECT * INTO test_table FROM <table>


(to get a clone of the original table


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page
   

- Advertisement -