Thursday, July 24, 2008

Inserting Chinese Alphabets into SQL Server 2005

If you have to insert a chinese alphabet/string value into your SQL Server 2005 table, then the string should be prefixed by the alphabet N.

DECLARE @LanguageTable TABLE
(RowID INT IDENTITY(1,1), RowValue NVARCHAR(255))

INSERT INTO @LanguageTable(RowValue)
SELECT N'中文'

SELECT * FROM @LanguageTable