For NVARCHAR2
and VARCHAR2
maximum size is 4000 bytes, or 32767 bytes if the MAX_STRING_SIZE
initialization parameter is set to EXTENDED
. This is useful you have to allocate more data to a variable.
Collation determines how strings are compared, which has a direct impact on ordering (sorting) and equality tests between strings.
There are two basic types of collation.
- Binary : Ordering and comparisons of string data are based on the numeric value of the characters in the strings.
- Linguistic : Ordering and comparisons of string data are based on the alphabetic sequence of the characters, regardless of their numeric values.
When using binary collations there are three suffixes that alter the behavior of sorts and comparisons.
- “_CI” : Case insensitive, but accent sensitive.
- “_AI” : Both case and accent insensitive.
- “_CS” : Both case and accent sensitive. This is default if no extension is used.
If no collation is specified, directly or via a default setting, the default USING_NLS_COMP
pseudo-collation is used, which means the NLS_SORT
and NLS_COMP
parameters are used to determine the actual collation used.
// Syntax
COLLATE BINARY_CS / BINARY_CI / BINARY_AI
column_name VARCHAR2(15 CHAR) COLLATE BINARY_CI
create table (...) DEFAULT COLLATION BINARY_CI;
ALTER TABLE t1 DEFAULT COLLATION BINARY_AI;
What are your thoughts on this post?
I’d love to hear from you! Click this link to email me—I reply to every message!
Also use the share button below if you liked this post. It makes me smile, when I see it.