md5 encryption for existing records code example Example: md5 encryption for existing records UPDATE yourtable SET hash = MD5(name) WHERE hash IS NULL