单行子查询问题
select ename from tab2 where (empno,ename) = (select empno,ename from tab3 where deptno=10);
单行子查询返回多个行;
下面这确可以
with tab2 as(select 2 empno,'zhang' ename from dual
union all
select 3 empno,'lise' ename from dual)
SELECT ename FROM tab2 WHERE (empno,ename) = (
with tab3 as (select 3 empno,'lise' ename, 604 dname from dual )
SELECT empno,ename FROM tab3 WHERE dname = 604)
------解决方案--------------------这是有什么问题吗?这只能说明10部门有多个员工