UPDATEBpm_tksign_dataSETIsCompleted= 1WHEREActinstid= '10000002433415' andNodeid= 'SignTask1' andIsCompleted= 0 andBatch= ( SELECT Max(A.batch) m fromBpm_tksign_data aWHEREA.actinstid= '10000002433415' andA.nodeid= 'SignTask1');
This type of writing, MySQL versions are not supported.
UPDATEBpm_tksign_dataSETIsCompleted= 1WHEREActinstid= '10000002433415' andNodeid= 'SignTask1' andIsCompleted= 0 andBatch= ( SELECT Max(A.batch) m from (SELECT * fromBpm_tksign_data) AWHEREA.actinstid= '10000002433415' andA.nodeid= 'SignTask1');
This notation, MySQL 5.6 support, MySQL 5.7 does not support.
UPDATEBpm_tksign_dataSETIsCompleted= 1WHEREActinstid= '10000002433415' andNodeid= 'SignTask1' andIsCompleted= 0 andBatch= ( SELECTp.m. from ( SELECT Max(A.batch) m fromBpm_tksign_data aWHEREA.actinstid= '10000002433415' andA.nodeid= 'SignTask1') (p);
This kind of writing, MySQL each version can support.
Mysql:you can ' t specify target table ' Bpm_tksign_data ' for update on FROM clause