national character large object
and nchar large object
National character strings are character strings with an implementation-defined character set (IV194). Thus, they don’t allow a character set
clause. The general assumption is that the implementation-defined character set is Unicode.
Some SQL products have only supported Unicode in the national character string types for a while. By now, most systems use Unicode as their default character set for all character strings. Even SQL Server supports Unicode in varchar
columns since the release 2019. However, there is a long story that some systems might only support the BMP of Unicode—i. e. not supporting emojis. Famous examples are MySQL/MariaDB with their utf8mb3 character set and SQL Server when using a collation without supplementary character (_SC
) support.
The types national character
, national char
, nchar
, national character varying
, national char varying
, nchar varying
, national character large object
, nchar large object
and nclob
are defined in ISO/IEC 9075-2:2023 as part of the optional feature F421, “National character”. Besides the large object variants, they were already available in SQL-92 (intermediate).
You can’t catch up on 20 years of SQL evolution in one day. Subscribe the newsletter via E-Mail, Bluesky or RSS to gradually catch up and to keep modern-sql.com on your radar.
The essence of SQL tuning in 200 pages
Buy now!
(paperback and/or PDF)
Paperback also available at Amazon.com.
Markus offers SQL training and consulting for developers working at companies of all sizes.
Learn more »