zoukankan      html  css  js  c++  java
  • oracle 的分页查询与mysql 的分页查询

    oracle 的分页查询:

    select * from (select o.*,rownum rn  from Persons o) where rn >40 and rn <=60 ;

    mySQL 的分页查询:

    select o.*  from Persons o limit 40,20 ;              limit (偏移条数,数据条数)

    SQLServer :top 

    select top 4 * from order by hiredate      自注: 显示第一个到第四个入职的员工

    SELECT
    TOP 10 *
    FROM
    (
    SELECT
    ROW_NUMBER () OVER (ORDER BY id ASC) RowNumber ,*
    FROM
    student
    ) A
    WHERE
    A.RowNumber > (PageNo - 1) * PageSize

  • 相关阅读:
    setsid
    dup
    信号量
    linux标准输入输出
    linux守护进程范例
    c++字符串操作
    浏览器缓存
    bfc
    苹果手机自制铃声
    vue-cli 源码解读
  • 原文地址:https://www.cnblogs.com/brianlai/p/10298057.html
Copyright © 2011-2022 走看看