-
- SQL> select a.deptno,a.dname,a.loc,(select count(deptno) from emp b where b.deptno=a.deptno group by b.deptno) as deptcount from dept a;
- DEPTNO DNAME LOC DEPTCOUNT
-
- 10 ACCOUNTING NEW YORK 6
- 20 RESEARCH DALLAS 5
- 30 SALES CHICAGO 6
- 40 OPERATIONS BOSTON
- 50 50abc 50def
- 60 Developer HaiKou
-
- 6 rows selected
|