Is there a good way in MySQL 5.1.* to not allow changes in a certain column. I know that it is possible to use triggers, however I wonder if there is aa easier way. Let's say I have the following table:
CREATE TABLE test (
id int auto_increment,
name varchar(20) not null,
phone varchar(20),
primary key(id)
)
Let's say that I don't want it to be possible to change name. The following query would fail:
UPDATE test
SET name = "Pelle"
WHERE id = 2
But it should be possible to insert to and delete rows. It should also be possible to change phone.