您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql取前几行数据limit用法_MySQL

2025/9/8 6:30:13发布30次查看
bitscn.com
在mysql中是没有top关键字的,在mysql中可以用limit来完成功能。
order by id desc limit 10 按照id的倒序排序 取出前10条
order by id desc limit 0,10 按照id的倒序排序 取出前10条
order by id limit 5,10 按照id的正序排序 从第5条开始取10条
sql语句:
select cat_id from shop_goods_type order by cat_id desc limit 1
bitscn.com
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product