在sql200中取指定行说的数据(以自增字段id作为主键,注意id 可能不连续)

来源:互联网 发布:淘宝刚付款可以退款吗 编辑:程序博客网 时间:2024/05/28 23:11

 其中用到top函数.

例如从table1中取表中的第5-7行

select top 3 * from table1 where id not in (select top 4 id from table1)

 

原创粉丝点击