首页  >  文章  >  数据库  >  mysql-mySQL的limit分页怎么转换成SQL server语句

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

WBOY
WBOY原创
2016-06-06 09:41:551640浏览

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语句达到分页的效果呢?

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn