SQL??“ALL”,????
- by Todd Bao
ALL????????????,>ALL?>=ALL?<ALL?<=ALL?=ALL?!=ALL???????????????????WHERE????TRUE?????????“=ALL”?????:select employee_id,last_name,department_id from hr.employees where department_id =ALL (select department_id from hr.employees where salary > 16000);EMPLOYEE_ID + LAST_NAME + DEPARTMENT_ID----------- + ------------------------- + ------------- 100 + King + 90 101 + Kochhar + 90 102 + De Haan + 903 rows selected.??????????SALARY??16000????????????????????(???90),???????????????????????,????????????department_id???,????????????,???16000???8000:select employee_id,last_name from hr.employees where department_id =ALL (select department_id from hr.employees where salary > 8000);no rows selected????,ALL???????????????????WHERE????TURE,??????,??????salary > 77777:select employee_id,last_name from hr.employees where department_id =ALL (select department_id from hr.employees where salary > 77777)/?????????????77777??,??????“where department_id =ALL (???)”??TRUE,?????????????:EMPLOYEE_ID + LAST_NAME----------- + ------------------------- 198 + OConnell 199 + Grant ... ..... 196 + Walsh 197 + Feeney107 rows selected.?????????????>ALL?<ALL?>=ALL?<=ALL?!=ALL??,??????????????,???????“?”??????????????????,?“?”?????????????????????????????:select * from hr.employees where department_id >=ALL (null)/Todd