For column values with the following data types, a code attribute can also be entered, if required: CHAR[ACTER], VARCHAR, LONG[VARCHAR].
A code attribute defines the sort sequence to be used for comparing values.
Code Attribute |
Column Values |
No code attribute |
The column values have the code attribute defined in the database system. |
ASCII |
The column values are stored in ASCII code. |
BYTE |
The column values are stored in a code, that is, the column values are not converted by the database system. |
UNICODE |
The application data in a table column is stored in UNICODE. |
It is also possible to specify a code attribute in the column definition for column values with data types CHAR[ACTER], VARCHAR und LONG[VARCHAR].
● If you do not specify a code attribute, the code defined in the database system is used. The code can be defined for specific users or globally using the following options:
The code can be defined for specific database users using appropriate SQL statements (for more information, see: CREATE/ALTER USER Statement or CREATE/ALTER USERGROUP Statement).
The code can be defined globally during the installation of the database system using the special database parameterDEFAULT_CODE.
The code defined for a database user overrides the code specified globally in the database system.
You can change a code attribute.
If you change the code attribute from ASCII to UNICODE, you should note that the column value cannot exceed the length of the column.
You can only change the code attribute from UNICODE to ASCII if all the data can be converted into ASCII values.
See also:
ALTER TABLE Statement (alter_table_statement)