I need a query to update a value in a table based on another value in the same table. The table is employees and when the field credits as an amount of 5, I need the field paid_credits to have a value of 5. When the credits field accumulates to 10, I need the paid_credits field to have the value of 10.
Just to clarify, when the credits field has a value of 13 for example the value in paid_credits should still be 10 but when credits is = to 15 the value in paid_credits should then be 15 and so on. Any help is appreciated.