To retrieve an unordered set of rows:
SELECT * FROM orders WHERE rownum < 2 ;
To retrieve rows of an ordered result set:
SELECT o.* FROM (SELECT * FROM orders ORDER BY orderid) o
WHERE rownum < 2 ;
This is because rownum is assigned to the result set when the records are retrieved and before they are sorted.
Note: In Sql Server, use the TOP keyword.