Encrypting data in existing tables

To encrypt columns in existing tables, use the modify column option on the alter table statement with the encrypt clause:

alter table table_name modify column_name
	[encrypt [with [[database.][owner].]keyname]]

where keyname identifies a key created using create encryption key. The creator of the table must have select permission on keyname. If keyname is not supplied, Adaptive Server looks for a default key created using the as default clause on the create encryption key.

See the Reference Manual: Commands.

There are restrictions on modifying encrypted columns:

You can alter the encryption property on a column at the same time you alter other attributes. You can also add an encrypted column using alter table.

For example:

alter table customer modify custid null encrypt with cc_key 
alter table customer add address varchar(50) encrypt with cc_key