You can create an encrypted table using the CREATE TABLE statement, or encrypt an existing table using the ALTER TABLE statement.
To use the CREATE TABLE statement, you must have one of the following system privileges:
To use the ALTER TABLE statement, you must be the owner of the table being altered or have one of the following privileges:
To encrypt tables in your database, table encryption must already be enabled in the database.
When you encrypt a table, the encryption algorithm and key that were specified at database creation time are used.
Option | Action |
---|---|
Create a table with encryption | Create a table using the ENCRYPTED clause of the CREATE TABLE statement. |
Encrypt an existing table | Encrypt a table with the ENCRYPTED clause of the ALTER TABLE statement. |
The table is encrypted.