Examples and limits of BYTE and CHAR semantics usage (NLS_LENGTH_SEMANTICS)
(Doc ID 144808.1)
Last updated on NOVEMBER 15, 2024
Applies to:
Oracle Database Backup Service - Version N/A and later Oracle Database Cloud Exadata Service - Version N/A and later Oracle Database - Enterprise Edition - Version 9.0.1.0 to 12.2.0.1 [Release 9.0.1 to 12.2] Oracle Database - Standard Edition - Version 9.0.1.0 and later Oracle Database Cloud Schema Service - Version N/A and later Information in this document applies to any platform.
Purpose
To document best practices, limits and details when implementing NLS_LENGTH_SEMANTICS as BYTE or CHAR.
Scope
Any DBA wanting to use NLS_LENGTH_SEMANTICS.
NLS_LENGTH_SEMANTICS allows you to specify the length of a column datatype in terms of CHARacters rather than in terms of BYTEs. Typically this is when using an AL32UTF8 or other varying width NLS_CHARACTERSET database where one character is not always one byte. While using CHAR semantics has as such no added value in a 7/8 bit characterset it's fully supported so any application code / table setup using CHAR can also be used in a 7/8bit characterset like US7ASCII/WE8MSWIN1252. This parameter is a 9i (and up) feature and is not available in older releases.
Make sure to check also "Things to know when using CHAR semantics:" as there are certain limitations on when you can use this.
Details
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!