Example showing how to query encrypted data

You can query encrypted data with the DECRYPT function or the SET ENCRYPTION PASSWORD statement.

The following example shows how to use the decrypt function to query encrypted data:
select name, decrypt_char(ssn, "one two three 123") from emp;
        or
set encryption password "one two three 123";
select name, salary, decrypt_char(ssn) from emp where name = 'Bob';