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
 General SQL Server Forums
 New to SQL Server Programming
 Saving a result set as a table

Author  Topic 

pwebley
Starting Member

6 Posts

Posted - 2012-02-09 : 12:04:56
Is is possible to save the outcome of a query as a new table? If so, how would I do that?

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-02-09 : 12:23:48
Use the INTO YourNewTable construct.
SELECT * INTO YourNewTable FROM YourOldTable
It does not necessarily have to be a simple select from a table - it can work with more complex queries as well. http://msdn.microsoft.com/en-us/library/ms188029.aspx
Go to Top of Page

pwebley
Starting Member

6 Posts

Posted - 2012-02-09 : 13:06:29
Thank you!
Go to Top of Page
   

- Advertisement -