By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Can you make a new table from query results in tsql?

P: 2
I'm using MS SQL Server Visual Studio 2008.

Oct 4 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 2,878
Try the keyword INTO.

Good luck...

--- CK
Oct 7 '09 #2

P: 149
Your question is not very clear.. Are you looking for a in-memory table?

In that case you can go ahead with

a) Common table expression(Sql Server 2005+) e.g.(with cte as (//code))

b) Table variables e.g.(declare @tbl Table(col1 int,col2 nvarchar(max))

c) Temporary table(#temp or ##temp)

d)Table Valued Parameter(Sql server 2008+)


Else, issue the create table command followed by insert into tablename values(value1,value2...value n) or insert command

Hope this helps
Nov 9 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.