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
 create table

Author  Topic 

sergio.muque
Starting Member

1 Post

Posted - 2012-06-08 : 06:39:42
hi i´m new in sql server database and i would like to know how can i create a temporary tambles?
help please


sergiomuque

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-06-08 : 06:43:50
By temporary do yoou mean those that are only available to the batch/spid and get dropped automatically?

create table #a (i int)

can also create from a query
select * into #a from mytbl where x = 'a'

global temp table is
create table ##a (i int)

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-06-08 : 12:02:23
quote:
Originally posted by sergio.muque

hi i´m new in sql server database and i would like to know how can i create a temporary tambles?
help please


sergiomuque


see

http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -