I am unable to create a temporary table in the tempdb database from within a stored proc in a test database. However when I go directly to the tempdb database I am able to create temp tables. Can anyone tell me what is going wrong...
create proc procname
----- procedure code
create table tempdb..mytemptable1 ( col1 int null)
<<<<Result: Stored Proc not created>>>>
When I switch to tempdb and give the following command
create table tempdb..mytemptable1 (col1 int null)
... the table is successfully created in tempdb database.