This is a follow-up to another forum post: Using MERGE to update matched items from a SELECT
When I run this query:
merge into `travel-sample` using (select name from `travel-sample` where name='Texas Wings') as d on key d.name when matched then update set d.iata='Bush'
It executes successfully (no error). However, it doesn’t seem to actually perform the update. So when I execute this query:
select * from `travel-sample` where name='Texas Wings'
It returns a record, but the “iata” field has not been updated to “Bush” (it’s still “TQ”). What am I missing?