select - inner-join in MYSQL with UPDATE not working -
Syntax does not work and returns an error on error # 1064 @ RT: = ... I do not know the variable to replace Please let it work. A working table with selection same The method is: To limit the number of rows you do not need the variable, it will update those 22 rows where the value meets the condition in the Edit: Oh, you're trying to get the amount of the quantity, maybe it will do the work you want: The SQL is bedded. UPDATE table @rt: = @ RT + volume; INNER JOIN (SELECT @rt: = 0) as INIT 1 on 1 = 1 SET status = '1' Where's the value < 10 and @ RT & lt; = 22
UPDATE `Table` SET status = 1 'where price & lt; 10th boundary 22;
where section My best estimate is what you want to do.
UPDATE `table` cross join (SELECT @rt: = 0) vars SET status = if ((rt: = @rt + volume) & lt; = 22, '1', position) Where value & Lt; 10;
Comments
Post a Comment