469,307 Members | 2,211 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

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

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

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

Good luck...

--- CK
Oct 7 '09 #2
nbiswas
149 100+
Hi,
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+)


etc.

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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.