Reputation: 1481
is it possible to lock selected columns in a mysql table, example table1 with columns: col1, col2, where col1 would be locked and now updating can be made while col2 is open for updates
Upvotes: 1
Views: 5474
Reputation: 15683
It sounds like what you want is to prevent values in col1 from being updated. If that's the case, then you might want to look into using a UPDATE trigger with BEFORE UPDATE clause on table1 and implement the logic that would only allow updating values in col2 but not col1 in that trigger.
Upvotes: 1