mysql> select * from customer; ------------- --------------------- -------------------- ------------------ | customer_id | customer_first_name | customer_last_name | customer_ssn | ------------- --------------------- -------------------- ------------------ | 1 | fred | smith | ☼Q,U¶ ¢ƒ╠▒4╨☺ö| ------------- --------------------- -------------------- ------------------ 1 row in set (0.03 sec) mysql> create view v_customer as t_name, -> select customer_id, customer_first_name, customer_last_name -> aes_decrypt(cusomer_ssn,'password') as customer_ssn -> from customer; Query OK, 0 rows affected (0.03 sec) mysql> select * from v_customer; ------------- --------------------- -------------------- -------------- | customer_id | customer_first_name | customer_last_name | customer_ssn | ------------- --------------------- -------------------- -------------- | 1 | fred | smith | 456097234 | ------------- --------------------- -------------------- -------------- 从上例可以看到,通过使用解密函数aes_decrypt()得到指定的customer_ssn的值并利用创建视图的方式把该值显示出来,而且 并未破环原始表对其他customer_ssn值在磁盘或数据库的加密式存放。这样管理人员就保证敏感信息不会被随意破坏。(51CTO.COM教程)