In my Oracle database wallet is configured. While i tried to create an index on the encrypted column then i got the following error:
SQL> CREATE INDEX EMP_IDX on EMPLOYEES(EMPID); error: ORA-28338: cannot encrypt indexed column(s) with salt
On the encrypted column with salt option, we cannot create the index, We need to modified the column property to the no salt. In Wallet, when we create the encrypt column to save data then with SALT option is default. it automatically pick by Oracle.
While Creating the table we have to follow the following syntax if we want to create index on that column:
CREATE TABLE employee ( empID NUMBER ENCRYPT NO SALT, salary NUMBER(6) ENCRYPT USING '3DES168');
If want to create the index on existing column which already encrypted then we use ALTER command:
ALTER TABLE employee MODIFY (empid ENCRYPT NO SALT);
After convert the encrypted from SALT to No SALT option. you will able to create index on it.