#temp_table vs user.#temp_table sybase_iq

Viewed 129

i wonder what is the difference between #temp_table and user.#temp_table

 -- 1) #Tem_table

  create table #temp_table
   ( id integer null);

 select * from #temp_table  -- find

select * from sysobjects where name = '#temp_table'-- not found

-- close my client

 select * from #temp_table -- not found

--2) user.#temp_table
 create table user.#temp_table
   ( id integer null);

  select * from user.#temp_table  -- found


 select * from sysobjects where name = '#temp_table'  --  found

-- close my client

  select * from sysobjects where name = '#temp_table'  -- still exist

My Main question is, why

 select * from sysobjects where name = '#temp_table'

return nothing, and with user.

  select * from sysobjects where name = '#temp_table'

returns the info.

1 Answers
Related