简体   繁体   中英

I am unable to display 3rd, 4th and 9th row in following table

I am unable to write a query to display 3rd, 4th and 9th row in following table because it doesn't contain any integer column...please help in finding the query for the same

_______________________________

| **name**  | **surname** | **address**   |
-------------------------------
| John  | Sailo   | Washington|
-------------------------------
| Peter | Mary    | New York  |
-------------------------------
| Sun   | Zombia  | Sri Lanka |
------------------------------- 
| Tom   | Tam     | India     |
------------------------------- 
| Addy   | Kakar  | Nepal     |
------------------------------- 
| Pun   | Zzom    | Australia |
------------------------------- 
| Tikki | Hob     | USA       |
------------------------------- 

If here is no ID or other collumn which help you to sort the data you can't acomplish the task,

however, if you don't care, you can use LIMIT to get a goal

SELECT * from names LIMIT 0,1;
#3rd and 4th
SELECT * from names LIMIT 2,2;
#9th
SELECT * from names LIMIT 8,1;
# all
SELECT * FROM names;

http://sqlfiddle.com/#!2/6b872/5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM