#Temp Table或@Table变量最适合使用哪个? [英] Which is Best to use, #Temp Table or @Table Variable?

查看:59
本文介绍了#Temp Table或@Table变量最适合使用哪个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常在y存储过程中使用#table.在SP中最好使用哪个?
#table或@Table变量?

谢谢

I usually use #table in y stored proc. Which is the best to use in SP?
#table or @Table variable?

Thanks

推荐答案

使用@Table变量很好,但同样,它取决于表中的行,列和数据的数量.


请查看以下文章,以了解有关此内容的更多信息.
http://sqlnerd.blogspot.in/2005/09/temp-tables- vs-table-variables.html [ ^ ]

如何创建#temp和@table
http://www.dotnetfunda. com/interview/exam297-what-is-temp-table-and-table-variable-in-sql-server.aspx [ http://sqlserverperformance.idera.com/uncategorized/performance-comparison -temp-tables-table-variables-sql-server/ [
Its good to use @Table variables but again, it depends on the number of rows, columns and data in the table.


Please look into the below article to know more about this.
http://sqlnerd.blogspot.in/2005/09/temp-tables-vs-table-variables.html[^]

How to create #temp and @table
http://www.dotnetfunda.com/interview/exam297-what-is-temp-table-and-table-variable-in-sql-server.aspx[^]

To know performance comparison.

http://sqlserverperformance.idera.com/uncategorized/performance-comparison-temp-tables-table-variables-sql-server/[^]


read this articles


试试这个
快速概述:SQL Server 2005中的临时表 [ ^ ]


try this one Quick Overview: Temporary Tables in SQL Server 2005[^]


Read these articles 



[ [ ^ ]]


[ [



[http://support.microsoft.com/default.aspx?scid=kb;en-us;305977&Product=sql2k[^]]

[http://blog.sqlauthority.com/2009/12/15/sql-server-difference-temptable-and-table-variable-temptable-in-memory-a-myth/[^]]


[http://stackoverflow.com/questions/27894/whats-the-difference-between-a-temp-table-and-table-variable-in-sql-server[^]]



[http://www.dotnetfunda.com/interview/exam297-what-is-temp-table-and-table-variable-in-sql-server-.aspx[^]]


这篇关于#Temp Table或@Table变量最适合使用哪个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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