golang中批量更新查询的最快方法

Nik*_*hah 5 sql database go

如何在 Golang 中执行批量更新查询?例如,我想在一个查询中执行这些查询。

update product set product_name='AAAA' where product_id='1'

update product set product_name='BBB' where product_id='2'

update product set product_name='CCC' where product_id='3'

update product set product_name='DDDD' where product_id='4'
Run Code Online (Sandbox Code Playgroud)