Jump to content

How to put an automatic arithmetic operator into a table column


stevieontario

Recommended Posts

Well, I hope both tables have corresponding values, which also means both tables have the same number or rows.

 

INSERT INTO `table_b` (`field_b2`) SELECT `b`.`field_b1` + `a`.`field_a2` AS `field_b2` FROM `table_b` b, `table_a` a

 

Not tested.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.