sqlserver top 与 mysql limit
2008-11-12 17:24
387 查看
mysql中常用的limit来分页的功能,在sqlserver中并没有那么好用,如
select * from table order by id desc limit startrow,maxrow
改为sqlserver为:
select top maxrow * from table where id not in (select top startrow id from table ) order by id desc
select * from table order by id desc limit startrow,maxrow
改为sqlserver为:
select top maxrow * from table where id not in (select top startrow id from table ) order by id desc
相关文章推荐
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT’
- sql语句中select top n与oracle的rownum与mysql的limit用法
- SQL查询Top N:MySQL Limit & Oracle ROWNUM
- sqlserver row_number 类似 mysql中 limit 用法
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
- sql语句中select top n与oracle的rownum与mysql的limit用法
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- sql语句中select top n与oracle的rownum与mysql的limit用法
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- sql语句中select top n与oracle的rownum与mysql的limit用法
- Mysql/SQLServer数据类型与java基本数据类型的对应
- MS SQL Server中的表的某些字段导入到MySql的表中相应字段的方法
- mysql的sql分页函数limit使用
- 完全jdbc操作 mysql Oracle sqlserver 链接类 不指定
- ibatis like mysql oracle sqlserver db2
- mysql 值/表达式判断函数ifnull()与if() [类似ms sql server的isnull()]
- MySQL导入sql脚本错误:2006 - MySQL server has gone away
- 错误信息:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve
- MySQL中如何实现select top n ----Limit