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.
Context and remarks
When you encrypt a table, the encryption algorithm and key that were specified at database creation time are used.
You can either create a table with encryption, or encrypt an existing table.
|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 following command creates an encrypted table named MyEmployees:
CREATE TABLE MyEmployees ( MemberID CHAR(40), CardNumber INTEGER ) ENCRYPTED;
The following statements create a table called MyEmployees2 and then encrypt it.
CREATE TABLE MyEmployees2 ( MemberID CHAR(40), CardNumber INTEGER ); ALTER TABLE MyEmployees2 ENCRYPTED;
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|