Try OpenEdge Now
skip to main content
Core Business Services - Security and Auditing
Transparent Data Encryption : Configuring Transparent Data Encryption policies : OpenEdge SQL support for transparent data encryption : Using the CREATE TABLE statement
 
Using the CREATE TABLE statement
Use the ENCRYPT WITH clause in the CREATE TABLE statement to create a new encrypted table. The syntax for the statement is:
CREATE TABLE [owner_name.]table_name
( {column_definition | table_constraint }, ...)
[ AREA area_name ]
    [ ENCRYPT WITH cipher]
    [BUFFER_POOL{PRIMARY|ALTERNATE}]
    [progress_table_attribute_keyword value ]
;

CREATE TABLE [ owner_name.]table_name
[ (column_name [ NOT NULL] , ... ) ]
[
AREA area_name ]    
[
ENCRYPT WITH cipher ]
     BUFFER_POOL{PRIMARY|>ALTERNATE}]
AS query_expression
;
The the ENCRYPT WITH clauses are highlighted in bold. For a list of supported values for cipher, see Table 1.
The following example illustrates the creation of a table using a the AES_CBC_192 encryption cipher:
CREATE TABLE tblname (fld1 int, fld2 int, fld3 varchar(25)) AREA areaname ENCRYPT WITH 'AES_CBC_192';
When the ENCRYPT WITH clause is specified, OpenEdge SQL creates a new encryption policy for the table in the security schema. Data encryption does not occur until database object blocks are written to disk by an application transaction or by separate utilities. Note that the database must first be transparent data encryption-enabled to use the ENCRYPT WITH clause and that the new table must be associated in the statement with a Type II storage area.