我正在尝试清理临时表。最快的方法是删除或截断表然后回滚并且只包含所需的行。现在我的问题是数据库的“死锁”。有没有办法使用'with nolock'让数据库不锁定
BEGIN TRANSACTION;
drop table audit.Testing with (nolock) ;
rollback transaction
SELECT *
from
(select *
,rn = ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Id DESC)
FROM audit.testing with (nolock)
) a
where rn =1
order by Id, SysEndTime desc```