![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Sql
627267358
这个作者很懒,什么都没留下…
展开
-
sqlserver 非游标表遍历
SqlServer 非游标表遍历以前存储过程中查询结果集一般使用游标遍历,但是游标遍历效率低,现整理非游标实现方式create table user (id varchar(50),usercode varchar(50),username varchar(50))select ROW_NUMBER() OVER(ORDER BY id) AS irow,* into #tempinfo from userdeclare @count int=0,@row int=0select @cou原创 2022-03-29 17:51:50 · 800 阅读 · 0 评论 -
SqlServer 死锁查询
死锁查询select request_session_id spid, OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type='OBJECT'排除死锁kill spid原创 2022-03-28 10:37:44 · 752 阅读 · 0 评论