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.
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.
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
Unanswered | Unsolved | Solved
MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright © 2006 - 2024 Percona LLC. All rights reserved.