请问各位大侠,下面的sql语句错在哪里? 小弟非常感谢!

2024-12-16 18:45:59
推荐回答(1个)
回答1:

子查询要有别名,如:
select top 3 *
from (select * from users where userName='admin') a
where userId not in (select top 0 userId from (select * from users where userName='admin') b)