Javaweb-子查詢

wangyin0425發表於2024-09-08



select * from emp where salary > (select salary from emp where name='豬八戒');





1. select * from emp where dep_id in (select did from dept where dname in ('財務部','市場部'));
2. select * from emp where dep_id=(select did from dept where dname='財務部');
3. select * from (select * from emp where join_date > '2011-11-11') t1 left join dept on t1.dep_id=dept.did;

相關文章