to 52juanjuan(Fibona) : update try1 set id =19 where id in (select top 1 from try1 order by no); parser: parse error at or near "1" at character 48 to hahawen(变态的大龄青年): update try1 set id =19 having no=max(no); ERROR: parser: parse error at or near "having" at character 24
update table1 set a=19 where a in (select max(b) from table1)
update try1 set id =19 where id in (select top 1 id from try1 order by no);
少写了一个或者改成: update try1 set id =19 where id in (select top 1 * from try1 order by no);
update try1 set id =19 where id in (select top 1 * from try1 order by no);
MySQL哪来的Top 1的语法? update table1 set a=19 where a in (select a from table1 order by b desc Limit 1)
update try1 set id =19 where id in (select top 1 from try1 order by no);
parser: parse error at or near "1" at character 48
to hahawen(变态的大龄青年):
update try1 set id =19 having no=max(no);
ERROR: parser: parse error at or near "having" at character 24
update try1 set id =19 where id in (select top 1 * from try1 order by no);
update table1 set a=19 where a in (select a from table1 order by b desc Limit 1)
mysql不支持子查询,所以你的要求不能在mysql中实现。请换用支持子查询的数据库