【发布时间】:2018-04-16 06:04:14
【问题描述】:
我想知道#temp_table 和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
-- 关闭我的客户端
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
--关闭我的客户端
select * from sysobjects where name = '#temp_table' -- still exist
我的主要问题是,为什么
select * from sysobjects where name = '#temp_table'
不返回任何内容,并且与用户一起。
select * from sysobjects where name = '#temp_table'
返回信息。
【问题讨论】:
标签: sql database temp-tables sap-iq