简体   繁体   English

我无法在下表中显示第3、4和9行

[英]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 我无法编写查询以显示下表中的第3、4和9行,因为它不包含任何整数列...请帮助查找相同的查询

_______________________________

| **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, 如果这里没有ID或其他列可以帮助您对无法完成任务的数据进行排序,

however, if you don't care, you can use LIMIT to get a goal 但是,如果您不在乎,可以使用LIMIT获得目标

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 http://sqlfiddle.com/#!2/6b872/5

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MYSQL:如何从第 3 行开始选择每 4 行? - MYSQL: How to select every 4th row STARTING from 3rd row? 来自txt(csv)文件的Python图形,共有5列,如何为y轴选择第3列或第4列? - Python graph from txt(csv) file and there are 5 columns, How Can I pick 3rd or 4th columns for y axis? SQL:如何从表中选择第 1、3、11 和第 n 行? - SQL: How to select 1st, 3rd, 11th and nth row from a table? PHP日期和时间,在一个月内获得第1周,第2周,第3周和第4周 - PHP Date and Time, getting the 1st, 2nd, 3rd, and 4th week in a month PHP:从mysql解析ID的第3位和第4位的所有数据 - PHP: Parse all data from mysql where the 3rd and 4th digit of the id 如果我们在mysql的第3次尝试中输入了错误的密码,而在oracle中的第4次尝试中输入了相同的查询,则帐户被锁定了? - Account is getting locked if we give wrong password at 3rd attempt in mysql while at 4th attempt in oracle with same query? 划分时缺少第4个Mysql行 <tr> (每个表行3个,每个列1个) - 4th Mysql Row missing when dividing in <tr> (3 per table-row 1 per colum) 如何在第 4 列包含与另一个表相同的 ID 的表中显示 3 列中的所有数据? - How to display all data in 3 columns from a table where the 4th column contains the same ID as another table? 我如何在mySQL数据库的第4行中回显不同的内容 - How would I echo something different with every 4th row of a mySQL database 我在MySQL中有4个表-与没有重复的第4个表联接(可能为null值) - I have 4 tables in MySQL - Join with 4th table without duplicates (possible null value)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM