简体   繁体   English

“SELECT INTO”会导致 SQL Server 上的任何表锁定吗?

[英]“SELECT INTO” causes any table locks on the SQL Server?

select * 
into BCK_PH 
from purchase_history
where cast(end_dt as date) <= '2018-06-30';  

Do we get any table locks and any performance issue, if we run the above query?如果我们运行上述查询,我​​们是否会遇到任何表锁定和任何性能问题? is there any alternative有没有其他选择

The base table that is "purchase_history" will be accessible during the query execution time.在查询执行期间可以访问“purchase_history”基表。 But the new table "BCK_PH" only be available to access just after the query execution finished.但是新表“BCK_PH”只能在查询执行完成后才能访问。 Click for more details . 点击了解更多详情

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM