mysql select where base64 not before

mysql select where base64 not before

如何 Select 来自 mysql 的查询并从基于 64 位编码的列中搜索 WHERE 它?

非常感谢任何形式的帮助:

SELECT * FROM `customer` WHERE base64_decode(name) LIKE '%bobby%'

从 MySQL 5.6.1 开始,您可以使用 FROM_BASE64() 执行此操作。

SELECT * FROM `customer` WHERE FROM_BASE64(name) LIKE '%bobby%'

早期版本需要安装 UDF。

但问题是:为什么要对稍后要搜索的数据进行编码?