Home > database >  Refer to update the update SQL statements
Refer to update the update SQL statements

Time:11-26

Used for the Mysql database, Sql demand, update the data in the table B data, data values for A fixed varchar value + selcet for B data from A table,
B data fields as varchar,

CodePudding user response:

UPDATE A table T1 SET T1. B field=(SELECT SUM (T2) B field) FROM A table T2 WHERE T2.=T1 conditions. Conditions);

CodePudding user response:

Although the hair the wrong section

Update the set b=concat (' XXX ', b)
  • Related