如何在mysql中编写极限查询. [英] How to write limit query in mysql.

查看:70
本文介绍了如何在mysql中编写极限查询.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


我试图在mysql中显示基于LIMIT的表数据.现在,我的查询是SELECT Name FROM Teacher_reg LIMIT 2,它正在显示前两个表数据.在这里,我的问题是我如何显示第20行的数据.我正在使用ID,但是在修改表时可以将其删除.因此,请帮助我解决此问题.提前谢谢..

Hello


I am trying to display table data based on LIMIT in mysql. Now My Query is SELECT Name FROM teacher_reg LIMIT 2 , It is displaying first two table data. Here, my problem is How i can display data from 20th row. I am using ID, But It can be delete when we are modifying table. So please help me to fix this problem. Thanks in advance..

推荐答案

hi,
limit有两个参数,如果您需要第20行有2条记录,则可以编写
SELECT name FROM Teacher_reg LIMIT 20,2

第一个参数是起始位置,第二个参数是页面大小(无记录)
hi ,
limit has two arguments if you require 2 record from 20th row you can write
SELECT Name FROM teacher_reg LIMIT 20,2

first argument is starting position and next is page size(no of record)


这篇关于如何在mysql中编写极限查询.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆