What Are Unicode Character String Data Types in MS SQL Server?
Submitted by: AdministratorUnicode character string data types are used to store Unicode character strings. SQL Server 2005 supports the following Unicode character string data types:
* NCHAR - Unicode character strings with a fixed length of n characters defined as NCHAR(n). The maximum length is 4,000 characters. NCHAR has two synonyms of NATIONAL CHAR and NATIONAL CHARACTER.
* VARCHAR - Unicode character strings with a variable length of n characters defined as VARCHAR(n). The maximum length is 4,000 characters. NVARCHAR has two synonyms of NATIONAL CHAR VARYING and NATIONAL CHARACTER VARYING. NVARCHAR also has special form as NVARCHAR(MAX), which can store up to 2^31-1 bytes.
* NTEXT - Unicode character strings with a variable length up to 2^31-1 (2,147,483,647) bytes. NTEXT is equivalent to NVARCHAR(MAX). NTEXT has a synonym of NATIONAL TEXT.
Submitted by: Administrator
* NCHAR - Unicode character strings with a fixed length of n characters defined as NCHAR(n). The maximum length is 4,000 characters. NCHAR has two synonyms of NATIONAL CHAR and NATIONAL CHARACTER.
* VARCHAR - Unicode character strings with a variable length of n characters defined as VARCHAR(n). The maximum length is 4,000 characters. NVARCHAR has two synonyms of NATIONAL CHAR VARYING and NATIONAL CHARACTER VARYING. NVARCHAR also has special form as NVARCHAR(MAX), which can store up to 2^31-1 bytes.
* NTEXT - Unicode character strings with a variable length up to 2^31-1 (2,147,483,647) bytes. NTEXT is equivalent to NVARCHAR(MAX). NTEXT has a synonym of NATIONAL TEXT.
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | What Happens If Strings Are Casted into Wrong Code Pages in MS SQL Server? |
☺ | PHP MSSQL - How To Display a Past Time in Days, Hours and Minutes? |
☺ | How To Configure and Test ODBC DSN Settings? |
☺ | How To Enter Unicode Character String Literals in MS SQL Server? |
☺ | How To Use UNION to Merge Outputs from Two Queries Together in MS SQL Server? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |