How can i change this Oracle SQL to MySQL -
the following oracle sql is
merge table1 rs using table2 ch on (rs.id = ch.id) when matched update set rs.column = ch.column rs.column not null
i want change sql mysql. how can that?
that merge doing update, not insert.
so can use update statement
update table1 rs inner join table2 ch on rs.id = ch.id set rs.column = ch.column rs.column not null
and if need upsert, mysql has insert on duplicate key update syntax
Comments
Post a Comment