Mysql
 sql >> Database >  >> RDS >> Mysql

MySQL - Come selezionare Minimo E Massimo in una query (UNION).

SELECT ename, sal
FROM EMP
WHERE sal = (SELECT MIN(sal) FROM EMP)
UNION
SELECT ename, sal
FROM EMP
WHERE sal = (SELECT MAX(sal) FROM EMP)