[EMAIL PROTECTED] wrote:
I need to get all the details of an employee whose salary is the lowest.
I can do like this in Oracle


select * from emp where id = (select min(id) from emp).


Can we have any alternative in MySQL for the above query, as sub queries are not supported in MySQL 4.0.21

There is no need for a subquery in this case:

select * from emp order by id limit 1;

--
Roger


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to