Apex Trigger
trigger AccountTrigger on Account (before update) {
for(Account acOld : Trigger.old){
for(Account acNew : Trigger.new){
if(acOld.id == acNew.id && acOld.name != acNew.name){
acNew.name.addError('Account name can not be updated');
}
}
}
}