how to achieve this without using nested query or sub query.
如何在不使用嵌套查询或子查询的情况下实现这一点。
select * from table_name where id=(select avg(id) from table_name);
need some suggestion.
需要一些建议。
2 个解决方案
#1
3
select * from table_name order by id desc limit 1
#2
0
How about
如何
SELECT
*
FROM
table_name
ORDER BY
id DESC
LIMIT 1
#1
3
select * from table_name order by id desc limit 1
#2
0
How about
如何
SELECT
*
FROM
table_name
ORDER BY
id DESC
LIMIT 1