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
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.