How to update all the records in a table with SQL?
Posted: Tue Jul 30, 2024 9:28 am
What event do I use to update all the records in a table with this SQL? What is the correct syntax?
UPDATE ListDecades SET Finish = CASE WHEN YEAR(CURDATE()) - DecadeInteger < 0 THEN 0 ELSE YEAR(CURDATE()) - DecadeInteger END, Start = CASE WHEN YEAR(CURDATE()) - DecadeInteger - 10 < 0 THEN 0 ELSE YEAR(CURDATE()) - DecadeInteger - 10 END