Home » Performance » MySQL » How to customize Query?
How to customize Query? [message #3675] Wed, 29 October 2008 02:45 Go to next message
hakeem  is currently offline hakeem
Messages: 1
Registered: October 2008
Junior Member
hello guys,

i have the following users on mysql table

yahoo
google
hotmail
gmail
mail
web

I want to select the first 2 record(yahoo, google), and next 2(hotmail, gmail),
and last 2 (mail, web) please how do i write the query.
Re: How to customize Query? [message #3697 is a reply to message #3675 ] Tue, 04 November 2008 10:41 Go to previous message
artur8ur  is currently offline artur8ur
Messages: 23
Registered: September 2008
Junior Member
Do you mean something like this?
SELECT * FROM users ORDER BY name LIMIT 0,2
SELECT * FROM users ORDER BY name LIMIT 2,2
SELECT * FROM users ORDER BY name LIMIT 4,2

Previous Topic:MySQL - Finalizing Transactions
Next Topic:Improving time for creating indices in MySQL ?
Goto Forum:
  


Current Time: Fri Jul 10 02:15:20 EDT 2009

Total time taken to generate the page: 0.06234 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.