【发布时间】:2021-06-22 14:54:09
【问题描述】:
UPDATE vaccine SET country_code = CASE
WHEN vaccine_country='Germany' THEN country_code ='DE'
WHEN vaccine_country='United States'THEN country_code='US'
WHEN vaccine_country='China' THEN country_code='CN'
WHEN vaccine_country='Turkey' THEN country_code='TR'
WHEN vaccine_country='Russia' THEN country_code='RU'
END
【问题讨论】:
-
疫苗表中是否有诸如vaccine_country='Germany'、'Russia'之类的值?
标签: sql postgresql sql-update