/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [UserId]
,[LoginIP]
,[LoginDate]
,[LoginRecordType]
FROM [jjoobb_statistic].[dbo].[Pub_UserLoginLog]
SELECT TOP 1000 [UserId]
,[LoginIP]
,[LoginDate]
,[LoginRecordType]
FROM [jjoobb_statistic].[dbo].[Pub_UserLoginLog] where UserId=23
--死锁检测
use master
Select * from sysprocesses where blocked<>0
--找到SPID
exec sp_lock
--根据SPID找到OBJID
select object_name(2073058421)
--根据OBJID找到表名