我在表中有大约50条左右的记录,我需要一个sql语句来更新所有5到9的引用列id。如何将它应用于每个适用的记录?
答案 0 :(得分:4)
UPDATE YourTable
SET referral_column_id = 9
WHERE referral_column_id = 5;
答案 1 :(得分:1)
UPDATE `table_name` SET `column_id` = 9 WHERE `column_id` = 5;
答案 2 :(得分:0)
UPDATE col SET referral = 9 WHERE referral =5