Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - Database Administration » Security » Keeping your data secure » Encrypting a database » Encrypting portions of a database » Table encryption

 

Encrypting tables

To encrypt tables in your database, table encryption must already be enabled in the database.

When you encrypt a table, the table encryption settings that were specified at database creation time, such as simple, AES, FIPS, and so on, are applied to the table.

To encrypt a table at table creation

  • Create a table using the ENCRYPTED clause of the CREATE TABLE statement.

    The following command creates an encrypted table named MyEmployees:

    CREATE TABLE MyEmployees (
     MemberID CHAR(40),
     CardNumber INTEGER )
    ENCRYPTED;

To decrypt a table after it has been created

  • Decrypt a table with the NOT ENCRYPTED clause of the ALTER TABLE statement.

    The following command decrypts the MyEmployees table created in the previous example:

    ALTER TABLE MyEmployees 
    NOT ENCRYPTED;
See also