Creating an encrypted table

This task is part of the main task of Encrypting local data. After you have complete these steps, return to Overview of local data encryption.

Procedure

Once you have established a connection to the DB2 Everyplace database and granted a user encryption privileges, the application can create encrypted tables using an extended CREATE TABLE statement. For example, you can create the following employee table:

SQLExecDirect(..., "CREATE TABLE EMPLOYEES (EMPNO INT PRIMARY KEY, NAME VARCHAR(30), 
SALARY DECIMAL(10,2)) WITH ENCRYPTION", SQL_NTS) 

Related concepts

Related tasks