create table #simple /*只对当前用户有效,其他用户无法使用,断掉连接后立即销毁该表*/
(
id int not null
)
select * from #simple
create table ##simple /*对任何前用户有效,断掉连接后立即销毁该表*/
(
id int not null
)
select * from ##simple
(
id int not null
)
select * from #simple
create table ##simple /*对任何前用户有效,断掉连接后立即销毁该表*/
(
id int not null
)
select * from ##simple
本文介绍了如何在数据库中创建两种不同类型的临时表:一种仅对当前用户会话有效,另一种则对所有用户会话有效。文章通过具体示例展示了如何定义这些临时表,并提供了查询这些表的方法。
1870

被折叠的 条评论
为什么被折叠?



