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 Administration
 how # works in sql

Author  Topic 

gonzalo garcia
Starting Member

1 Post

Posted - 2010-05-25 : 11:23:24
i just got a funny query that use a #Name as parameter

SpTable #SomeName

and inside the SP it use this line

Create Procedure SpTable
@parameter varchar(30)
as

select
*
from @parameter

how this # sign works in sql? do someone know?

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2010-05-25 : 11:36:16
# tells the optimiser that the object exists in the tempdb.
Go to Top of Page
   

- Advertisement -