GET ADMISSION in any stream CONTACT :: Mr. JAYDEEP MEHTA :: CONTACT NO :: 9228217183
Get & share knowledge with us... Be a part of GTU-MATERIAL. send study Material at gtumca1@gmail.com with your Name - College name...

Wednesday, December 15, 2010

NCHAR and NVARCHAR2 Datatypes

NCHAR and NVARCHAR2 Datatypes

NCHAR and NVARCHAR2 are Unicode datatypes that store Unicode character data. The character set of NCHAR and NVARCHAR2 datatypes can only be either AL16UTF16 or UTF8 and is specified at database creation time as the national character set. AL16UTF16 and UTF8 are both Unicode encoding.
·         The NCHAR datatype stores fixed-length character strings that correspond to the national character set.
·         The NVARCHAR2 datatype stores variable length character strings.
When you create a table with an NCHAR or NVARCHAR2 column, the maximum size specified is always in character length semantics. Character length semantics is the default and only length semantics for NCHAR or NVARCHAR2.
For example, if national character set is UTF8, then the following statement defines the maximum byte length of 90 bytes:
CREATE TABLE tab1 (col1 NCHAR(30));
This statement creates a column with maximum character length of 30. The maximum byte length is the multiple of the maximum character length and the maximum number of bytes in each character.
This section includes the following topics:
·         NCHAR
·         NVARCHAR2

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More