Excuse me, is there any SQL that can directly sort the current table by score, and then update a field in the top ten?
业精于勤,荒于嬉;行成于思,毁于随。
That is, the IN/ALL/ANY/SOME subquery using the LIMIT clause is not supported, as long as you add another layer, such as:
UPDATE table SET name='zhangsan' WHERE id IN (SELECT t.id FROM (SELECT id FROM table LIMIT 10) AS t)
update table set name='zhangsan' where id in ( select id from table order by sorce desc limit 10 ) //可以做到,子查询就完事
That is, the IN/ALL/ANY/SOME subquery using the LIMIT clause is not supported, as long as you add another layer, such as: