我有以下查询,我需要使用不同的名称多次运行它,但是如何创建所有查询的函数,以便我只需要运行该函数而不是一个一个地运行所有查询。
update clean.vehicles set make='Ford' where type ilike '%explorer%'
update clean.vehicles set make='Chevrolet' where type ilike '%lumina%'
update clean.vehicles set make='Ford' where type ilike '%crown%'
update clean.vehicles set make='Subaru' where type ilike '%suburu%'
update clean.vehicles set make='Subaru' where type ilike '%legacy%'
update clean.vehicles set make='Infiniti' where type ilike '%infinitie%'
update clean.vehicles set make='Ford' where type ilike '%windstar%'
update clean.vehicles set make='Volkswagen' where type ilike '%vw%'
update clean.vehicles set make='Mitsubishi' where type ilike '%mitsubishi%'
update clean.vehicles set make='Infiniti' where type ilike '%infiniti%'
update clean.vehicles set make='Chevrolet' where type ilike '%chev%'
update clean.vehicles set make='Chrysler' where type ilike '%plymouth%'
update clean.vehicles set make='Chrysler' where type ilike '%plymoth%
谢谢