Home  >  Article  >  Database  >  mysql-mySQL的limit分页怎么转换成SQL server语句

mysql-mySQL的limit分页怎么转换成SQL server语句

WBOY
WBOYOriginal
2016-06-06 09:41:551640browse

mysqlsqlservermyeclipsesql server 2012android开发

String sql="select " + str + " from product,shop where product.shop_id=shop.shop_id " + " limit " + (page *size) + "," + size;//通过limit来达到分页的效果_

其中定义了private String str = "product.product_id,product.category_id,product.shop_id,product.sub_category_id,product.city_id,product.product_title,"
+ "shop.shop_name,shop.shop_tel,shop.shop_address,shop.shop_area,shop.shop_open_time,shop.shop_lon,shop.shop_lat,shop.shop_traffic_info";

那么问题来了,上面的mySQL语句要怎么转换成SQL server语句达到分页的效果呢?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn