472,097 Members | 1,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,097 software developers and data experts.

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

I'm using MS SQL Server Visual Studio 2008.

Oct 4 '09 #1
2 2021
2,878 Expert 2GB
Try the keyword INTO.

Good luck...

--- CK
Oct 7 '09 #2
149 100+
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 into..select command

Hope this helps
Nov 9 '09 #3

Post your reply

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

Similar topics

1 post views Thread by Stephen Miller | last post: by
7 posts views Thread by rednexgfx_k | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.