首頁  >  文章  >  資料庫  >  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