473,396 Members | 1,784 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,396 software developers and data experts.

MySQL: select row numbers

Hi,

I would like to be able to do something like this...

select name,dob from employees where [rownum] > 10 and [rownum] < 20;

.... results from this would show me data from the 10th, 11th,... and 19th
row.

is this an option?
Thanks

Jul 16 '05 #1
3 6272
"Disco" <di**********@yahoo.com> wrote in news:oEuTa.140$0h6.10237
@nnrp1.ozemail.com.au:
Hi,

I would like to be able to do something like this...

select name,dob from employees where [rownum] > 10 and [rownum] < 20;

... results from this would show me data from the 10th, 11th,... and 19th
row.

is this an option?


try it!
Jul 16 '05 #2
select name,dob from employees
order by name
LIMIT 10,20

"Disco" <di**********@yahoo.com> wrote in message
news:oE*****************@nnrp1.ozemail.com.au...
Hi,

I would like to be able to do something like this...

select name,dob from employees where [rownum] > 10 and [rownum] < 20;

... results from this would show me data from the 10th, 11th,... and 19th
row.

is this an option?
Thanks

Jul 16 '05 #3
select name,dob from employees where ID >= 10 AND <= 20
ID in this case is the automatically incremented row id. I always use one!
HTH

"Disco" <di**********@yahoo.com> wrote in message
news:oE*****************@nnrp1.ozemail.com.au...
Hi,

I would like to be able to do something like this...

select name,dob from employees where [rownum] > 10 and [rownum] < 20;

... results from this would show me data from the 10th, 11th,... and 19th
row.

is this an option?
Thanks

Jul 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rahul Anand | last post by:
Hi all, I am trying to fetch 5 records, randomly picked and in random order from a MySQL table (MySQL version > 3.23). I wrote my SQL Query as SELECT name,id FROM tablename WHERE active =...
0
by: Philip Stoev | last post by:
Hi all, Please tell me if any of this makes sense. Any pointers to relevant projects/articles will be much appreciated. Philip Stoev http://www.stoev.org/pivot/manifest.htm ...
9
by: jossinet | last post by:
Bonjour, j'ai une table : matable dans laquelle j'ai un champs : codepostal Ce champs code postal est rempli d'enregistrements qui ont des valeurs de 5 chiffres. Je souhaite créer un bouton...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
2
by: news | last post by:
This is a tough question to ask. I need to pull up a report of all the orders in our e-commerce site, that has more than one item attributed to it. orders.ordernum, orderitems.itemnumber...
34
by: Karam Chand | last post by:
Hello I have been working with Access and MySQL for pretty long time. Very simple and able to perform their jobs. I dont need to start a flame anymore :) I have to work with PGSQL for my...
8
by: Fred | last post by:
Hello, Our website is currently developed in ASP/Mysql 4. The dedicated servers on which it is currently hosted arrive at saturation. Here is their configuration: - 1 server PIV 2,8Ghz 1GB...
13
by: Ciaran | last post by:
Hi All, Is it faster to have mySql look up as much data as possible in one complex query or to have php do all the complex processing and submit lots of simple queries to the mysql database? ...
3
by: Vague | last post by:
Hello There, I've recently been working on a large project, very database driven, in C# on windows systems, calling a MySQL database on a linux box. The project is going very well. Except that...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.