SQL中的临时表 [英] Temporary Tables in SQL

查看:131
本文介绍了SQL中的临时表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我可以建议一下MS SQL Server中有多少种临时表.

HI All,
Can me suggest how much types of temporary tables in MS SQL Server.

Thanks in advance!

推荐答案

请查看以下CP文章: ^ ]
Have look at this CP Article: Quick Overview: Temporary Tables in SQL Server 2005[^]


看看下面的链接.

http://decipherinfosys.wordpress.com/2007/05/04/temporary -tables-ms-sql-server/
Have a look at below link.

http://decipherinfosys.wordpress.com/2007/05/04/temporary-tables-ms-sql-server/


TSQL中有两种类型的临时表

1.本地临时表是仅对创建它们的会话可用的临时表.这些表将在创建它们的过程或会话结束时自动销毁.
2.全局临时表是可用于所有会话和所有用户的临时表.当使用临时表的最后一个会话完成时,它们将自动删除.本地临时表和全局临时表都是在tempdb数据库中创建的物理表.


有关更多参考,请访问:http://www.sqlservercentral.com/articles/T-SQL/temptablesinsqlserver/1279/
There are two types of temporary tables in TSQL

1.Local temporary tables are temporary tables that are available only to the session that created them. These tables are automatically destroyed at the termination of the procedure or session that created them.
2. Global temporary tables are temporary tables that are available to all sessions and all users. They are dropped automatically when the last session using the temporary table has completed. Both local temporary tables and global temporary tables are physical tables created within the tempdb database.


For more Reffer:http://www.sqlservercentral.com/articles/T-SQL/temptablesinsqlserver/1279/


这篇关于SQL中的临时表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆