zoukankan      html  css  js  c++  java
  • 取表中第30到第40条记录

    标实字段没有规律
    select top 10 * from 飞狐工作室 where 身份证号码 not in
     (select top 30 身份证号码 from 飞狐工作室) order by 身份证号码 asc
    标实字段有规律(例如:自动编号)
    select top 10 * from 章立民研究室 where 员工编号 not in
     (select top 30 员工编号 from 章立民研究室 order by 员工编号 asc)
    均可
    select top 10 * from 章立民研究室 where 员工编号 not in
     (select top 30 员工编号 from 章立民研究室 order by 员工编号 asc) order by 员工编号 asc
    select top 10 * from 飞狐工作室 where 身份证号码 not in
     (select top 30 身份证号码 from 飞狐工作室 order by 身份证号码 asc) order by 身份证号码 asc
    万能
    select * from
    (
    select ROW_NUMBER() OVER (order by 身份证号码) AS 序号,*
    from 飞狐工作室
    ) t1
    where 序号>30 and 序号<41
    用游标取30到第40条数据
    declare cur_au scroll cursor for
     select top 40 * from dbo.章立民研究室
    open cur_au
    fetch absolute 31 from cur_au
    while @@fetch_status = 0
     begin
      fetch next from cur_au
     end
    close cur_au
    deallocate cur_au
  • 相关阅读:
    Linux定时运行程序脚本
    git tips
    Python循环
    Head First Design Patterns
    animation过渡效果
    图像处理池化层pooling和卷积核
    TensorFlow的梯度裁剪
    神经网络优化方法总结:SGD,Momentum,AdaGrad,RMSProp,Adam
    CNN网络架构演进
    TensorFlow object detection API应用
  • 原文地址:https://www.cnblogs.com/cxy521/p/1048323.html
Copyright © 2011-2022 走看看