SingleStore provide multiple ways to Update data in a table using another table.

SingleStore: Update Using Another Table

There are many scenarios where it is required to update a table either directly or using another table.

Sample Table and Data

Basic update : Update hardcode values to a table

UPDATE updatetable 
SET indicator_flag='Y'
WHERE id=4;

Output:
Rows matched: 1  Changed: 1  Warnings: 0.


Multicolumn update : Update multiple column of a table

UPDATE updatetable 
SET indicator_flag='Y',
    name='Hive'
WHERE id=4;

Output:
Rows matched: 1  Changed: 1  Warnings: 0


➠ Different approaches can be used to update data from one table using other table.