update如何只更新记录号最大的一条记录
我这样写update tbl_aset data= "hello"
where seq = (selectmax(seq) from tbl_a);
这样存在360的错误,不能使用临时表,如何通过调整sql实现? -360 Cannot modify table or view used in subquery.
The UPDATE, INSERT, or DELETE statement uses data taken from the same table
in a subquery. This action is not allowed because of the danger of getting
into an endless loop. Select the input data into a temporary table first,
and then refer to the temporary table in the UPDATE or INSERT statement. 先找到SEQ最大的记录,在修改不行吗?
页:
[1]