select * from emp_employee
where 100 >= (select count(*) from emp_employeegroup by department)消息 512,级别 16,状态 1,第 1 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
where 100 >= (select count(*) from emp_employeegroup by department)消息 512,级别 16,状态 1,第 1 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
department
-------
001
002-----------------------那GROUP BY 之后.也会产生多条记录.请问,此时应该是>=哪个?..----------------select * from emp_employee as a
where 100 >= (select count(*) from emp_employee
WHERE A.department = department)
group by department
count( chnalias)>=100
group by department
having 100 >= count(*)