zoukankan      html  css  js  c++  java
  • mysql limit的使用方法

    mysql的分页limit的使用方法大全
    1.取表中的n行之后的m条元组(limit n,m)
    select * from student limit 4,8; //取出student表中第4行后的8条元组(这里的区间是左开右闭)
    2.取出表中前m行元素(limit m)
    select * from student limit 3; //取出student表中的前3行元组
    3.取出某表某页中的元素
    在某表中满足某一条件的元组集合我们认为是页。
    <1>取页中的n行之后的m条元组(limit n,m)
    select * from student where score>75 limit 2,2; //取出满足成绩大于75分的页中2行以后两条元组
    <2>取页中的m条元组(limit m)
    select * from student where score>75 limit 2; //取出满足成绩大于75分的页中前2行元组
  • 相关阅读:
    HDU5914
    HDU1087(dp)
    HDU1711(KMP)
    HDU1251(字典树)
    HDU3068(Manacher算法)
    POJ2187(旋转卡壳)
    HDU1392(凸包)
    CodeForces 722B
    CodeForces 722A
    CodeForces 721B
  • 原文地址:https://www.cnblogs.com/FengZeng666/p/11387643.html
Copyright © 2011-2022 走看看