如果在日志中发现某个用户 ID 违规,我不会更新列。
UPDATE
USER_CHECK_LOGIN
SET
CHECKLOGIN = 2
WHERE
USER_CHECK_LOGIN.USER_ID = (SELECT NAME from XTREME.gamelogs.dbo.LOG_USING_DEPOT201211 WHERE GATENUM=150);
这个查询的作用是,如果在日志中找到一个用户 ID,其门数为 150,则所有用户都将被禁止。
但我似乎得到了一个错误。
Msg 512, Level 16, State 1, Line 2
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.