Name
DECODE()
Synopsis
DECODE(string, password
)
This function decrypts a given string that was encrypted with a given password. See the ENCODE() function later in this chapter:
SELECT ENCODE(pwd, 'oreilly') FROM teachers WHERE teacher_id = '730522';
This function decrypts the contents of the
pwd
column and unlocks it using the
oreilly password, which was used to encrypt it
originally using ENCODE().
Get MySQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.