473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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
3 43777
r035198x
13,262 8TB
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
8,127 Expert 4TB
ROWNUM and ROWID are Oracle only terms.
These two are pseudo columns not supported in any other database.
Feb 5 '08 #3
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

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

Similar topics

4
by: Otto Haldi | last post by:
Hello to all, Could somebody tell me if it's possible to lock a record with PHP when I have a simple MySQL Database by a provider ? Many thanks in advance for your help. Best regards
9
by: Sandy | last post by:
I am trying to do the following: EXEC SQL UPDATE MY TABLE SET COL1 = :newValue WHERE COL1 = 0 AND ROWNUM = 1 ORDER BY COL2; (index on COL1, COL2)
0
by: Jonas Gorauskas | last post by:
I am having this one problem on an app I am writing where it shows the following error on some error trapping that I did: Query failed: Error Number: 1064 Description: You have an error in...
4
by: Paul Drummond | last post by:
Hi all, I have no idea where to post questions like this. Just tried sending this message to comp.database but that didn't work - read-only newsgroup or something. So I appologise for posting...
3
by: Zeeshan | last post by:
Hi everybody, How can I get rownum using MySQL queries , In Oracle one can you in this way SELECT rownum as srno, fname FROM tablename suppose If there are 45 records and if i use while for the...
5
by: uthuras | last post by:
Machine : AIX 5.2 Product : UDB DB2 Release 8.1 FP4a I have problem loading data into destination table. The data file is huge with more than 6 Million records. This what i have done 1....
1
by: RobbGMelenyk | last post by:
The following query: SELECT rownum from(SELECT @rownum:=@rownum+1 rownum, t.*FROM (SELECT @rownum:=0) r, (SELECT Application FROM application_list_1.application_data_table a ORDER BY...
3
by: chitranjan | last post by:
hi all Is postgreSQL supports ROWNUM and ROWID ? -thanks- Chitranjan Singh
0
by: Walt | last post by:
Darta wrote: I haven't read the question in detail, so this may be way off base, but have you considered using rowid instead of rownum? rownum is a psuedo-column that's a bit "slippery", i.e....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.