By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

Is there any alternative for ROWNUM and ROWID in mysql??

P: 43
hi ,
i need to know whether there is any alternative method through which i can get the result of the querries like below in my sql...

Expand|Select|Wrap|Line Numbers
  1. select * from table_name where rownum=1 and rowid not in (select rowid from table_name where rownum<10)
thanks in adwance
Feb 4 '08 #1
Share this Question
Share on Google+
3 Replies


10K+
P: 13,264
hi ,
i need to know whether there is any alternative method through which i can get the result of the querries like below in my sql...

Expand|Select|Wrap|Line Numbers
  1. select * from table_name where rownum=1 and rowid not in (select rowid from table_name where rownum<10)
thanks in adwance
That is not valid MySQL. In mysql you use limit to limit the number of rows returned. Is that what you are looking for or are you looking for oracle alternatives?
Feb 4 '08 #2

debasisdas
Expert 5K+
P: 8,127
ROWNUM and ROWID are Oracle only terms.
These two are pseudo columns not supported in any other database.
Feb 5 '08 #3

P: n/a
Yes, ROWNUM and ROWID are Oracle only terms.
In MYSQL, use this one :

SELECT your_columns FROM your_table LIMIT 1 (or your rows number);
Oct 20 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.