欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2022-04-28 12:12:45
...
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语句达到分页的效果呢?