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 2000 Forums
 Transact-SQL (2000)
 Creating a SQLServer table from a select query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-16 : 08:34:55
Paul writes "In SQL Query Analyzer, what is the syntax for creating a table to contain the results of a select query? In Oracle, this would be in the form like: Create newTableName as Select.......
I am using SQL Server 2000 SP3."

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 08:52:41
SELECT MyColumn1, MyColumn2
INTO MyNewTable
FROM MyOldTable

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 08:52:50
select ...
INTO YourTableName -- usually this is used to store stuff into a temporary table...
from ....



Go with the flow & have fun! Else fight the flow
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 08:53:10


Go with the flow & have fun! Else fight the flow
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 09:37:14
hehehe 9 seconds!

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-16 : 09:40:03
just the time i needed to write that comment


Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -