select user_id from users where rownum < 10;
Unfortunately it does not always behave like you would think. It is calculated on the fly, so
select user_id from users where rownum > 500
won't get you what you want.