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. 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

A working table with selection

same The method is:

  UPDATE `Table` SET status = 1 'where price & lt; 10th boundary 22;   

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 where section My best estimate is what you want to do.

Edit:

Oh, you're trying to get the amount of the quantity, maybe it will do the work you want:

  UPDATE `table` cross join (SELECT @rt: = 0) vars SET status = if ((rt: = @rt + volume) & lt; = 22, '1', position) Where value & Lt; 10;   

The SQL is bedded.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -