In my case, I tried to copy the encrypted value from one row to an empty field in another row in the same table. In this case, I needed to copy Johnโs PIN into Janeโs PIN.
@mohang has this right. Here is my adaptation :)
name pin john sdhjduwhdowodw7d87e838g83g8g3of... jane //copy from field with value into empty field UPDATE my_table AS target LEFT JOIN my_table AS source ON source.pin != "" SET target.pin = source.pin WHERE target.pin = ""; // Hurray, it works! name pin john sdhjduwhdowodw7d87e838g83g8g3of... jane sdhjduwhdowodw7d87e838g83g8g3of...
bcintegrity
source share