SELECT DISTINCT file_format FROM table #### UPDATE table SET file_format='p$b.zip' WHERE file_format IN (....)