There is no any differece in the syntax of creating temp tabls and putting information into it. The only difference is the # and ## sign with the name of temp table. # is for private temp table and it is only for the current connection. Other users can't see this table. ## is for public temp tables and others users can see it.
For example.
Create Table #temptable
(
TempID [int] ,
Data [varchar]
)
Insert into #temptable (TempID , Data ) Values (1, 'data1')
All the rules which are applied to permanent table also can be applied to temp table.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.