Setting a Decrypt Default Value for a Column
Go Up to Encrypting Data
When encrypting a column, the database or table owner can specify a decrypt default value that displays when a user who does not have decrypt privileges for that column tries to access the column’s data. If a decrypt default value is not specified, the user will get an error message. A decrypt default value also allows existing reports and applications to run without raising permission exceptions when columns are encrypted.
To specify a decrypt default value, use the following syntax:
create table table-name (column-name data-type encrypt [[with] key_name] [decrypt default value], …)
A decrypt default can be changed or dropped from a column. Note that a decrypt default is not automatically dropped when a column is decrypted.
alter table table-name alter [column] column-name [no] decrypt default value