I added new columns to the current table employee
called salary
, now I have to add values for 100 records. I don't want to write the update column 100 times,more over I can't define case statement , because salary for each employeeId is different. So the command below is not what I want.
UPDATE employee
SET salary = 10000
WHERE employeeId = 1;
THE SAME FOR employeeId = 2,3,....
I am interesting to have id as parameter like @id, as employeeId defined aut_increment , so in each iteration adding a corresponding values to it.
Imagin salaries are (1000,2000,4000,5000,....) What are the best way or solutions to do that?