The CREATE the SYMMETRIC KEY ZXC the WITH the ALGORITHM = AES_256 the ENCRYPTION BY PASSWORD = ' ZXC123456 ' - creating keys the OPEN the SYMMETRIC KEY ZXC the DECRYPTION BY PASSWORD = ' ZXC123456 ' - open keys the SELECT the CONVERT ( VARCHAR ( 10 ), DecryptByKey (the EncryptByKey (Key_guid ( ' ZXC ' ), ' YHDH_C ' ))) - set encryption CLOSE SYMMETRIC KEY ZXC; DROP SYMMETRIC KEY ZXC;