. MySQL . , "AS", . , , where, . .
UPDATE tbl
SET field=newValue
WHERE tbl.key IN
(SELECT idNew FROM
(Select tbl.key AS idNew
FROM tbl
WHERE field=editValue) AS tblNew);
tbl -
-
newValue -
tbl.key -
idNew - , . - . 'id' 'id_new' 'id_n'
editValue -
tblNew - , . - 'tbl_n' 'tbl_new' 'tbl_test'
, , , , tbl, MySQL, , , .
, - !
source
share