zcgw.net
当前位置:首页 >> sqlmAxlimit >>

sqlmAxlimit

select * From table where id = (select max(id) from table))

SELECT SUM(avg_p) FROM ( select avg_p from hs300_sql WHERE created_at=(SELECT MAX(created_at) FROM hs300_sql) AND period='06s' ORDER BY quanzhong DESC )k limit 149;

SELECT id from job_01 order by id desc limit 1 (mysql)SELECT top 1 id from job_01 order by id desc (sql server)

你这句提速的话,可以首先考虑把排序去掉 然后你这两个关联的字段是否有索引

1、亲Mybatis是自己写Sql语句啊,和Hibernate不一样。 2、如何知道上面的,你还要知道MySql有一个分页语句叫limit,如:limit(1,10);前面一个参数是起始...

网站首页 | 网站地图
All rights reserved Powered by www.zcgw.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com