Лекции.Орг


Поиск:




Категории:

Астрономия
Биология
География
Другие языки
Интернет
Информатика
История
Культура
Литература
Логика
Математика
Медицина
Механика
Охрана труда
Педагогика
Политика
Право
Психология
Религия
Риторика
Социология
Спорт
Строительство
Технология
Транспорт
Физика
Философия
Финансы
Химия
Экология
Экономика
Электроника

 

 

 

 


The nvarchar2 and nchar datatypes




the NVARCHAR2 and NCHAR datatypes represent character data using the national character set rather than the database character set. In addition, they are always declared using character semantics (no CHAR qualifier applies). Other than those two differences, NVARCHAR2 and NCHAR are just like their counterparts, VARCHAR2 and CHAR. Use NVARCHAR2 for variable-length strings in the national character set, and use NCHAR for fixed-length strings in the national character set.

Following are some exampledeclarations:

line_of_text NVARCHAR2(2000); -- 2000 characters, variable-lengthfeature_name NCHAR(100); -- 100 characters, fixed-length

Prior to Oracle9i, the national character set could be any one of a large number of single- and multibyte character sets. Beginning with Oracle9i, the national character set used by NCHAR and NVARCHAR2 variables must be either UTF-8 (multibyte, variable-width) or UTF-16 (multibyte, fixed-width).

See Section 8.1.3 earlier in this chapter for a more detailed explanation of database and national character sets.

 

 

The NVARCHAR2 and NCHAR types have been improved in Oracle9i, and you may now freely mix them in expressions involving VARCHAR2 and CHAR. Prior to Oracle9i, for example, if you attempted to compare a VARCHAR2 value with an NVARCHAR2 value, PL/SQL would return a PLS-00561: character set mismatch error. In Oracle9i, such expressions are possible. Of course, you pay a penalty in terms of efficiency, because PL/SQL must implicitly convert the values to a common character set.





Поделиться с друзьями:


Дата добавления: 2015-10-01; Мы поможем в написании ваших работ!; просмотров: 443 | Нарушение авторских прав


Поиск на сайте:

Лучшие изречения:

Начинать всегда стоит с того, что сеет сомнения. © Борис Стругацкий
==> читать все изречения...

2298 - | 2047 -


© 2015-2024 lektsii.org - Контакты - Последнее добавление

Ген: 0.007 с.