Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

MSSQLFUN

I, Rohit Garg, am working as Consultant in IT Company. I am having an around 5 years of experience in MSSQL server & other Microsoft technologies. I am working as DBA in Microsoft SQL Server from last 5 years in e-Commerce, Telecom, Finance domain. In this tenure, I got a chance of working as Database administrator, Developer and trainer on SQL server 2000 to SQL Server 2012. I am holding Master’s degree in Computer Science along with certification in SQL Server & .Net. I like to learn new things by hand-on experience on regular basis. This journey is so far is delightful & valuable with the addition of wonderful friends.

Multilanguage Table, How to insert different language text in table ?

Issue :

Today, I received one request from my old friend.

He wants to insert text in different languages in table. He is looking to create Multilanguage table.

Solution :

The simplest solution is to insert data in table as NVARCHAR data type, like below.

–Create Table

CREATE TABLE TBL_LANG

(

LNAME VARCHAR(50),

LTXT NVARCHAR(100)

)

–Insert “Hello World” in diffrent language

INSERT INTO TBL_LANG

VALUES (‘English’,N’Hello World’)

INSERT INTO TBL_LANG

VALUES (‘Hindi’,N’???? ??????’)

INSERT INTO TBL_LANG

VALUES (‘Chines’,N’????’)

INSERT INTO TBL_LANG

VALUES (‘Urdu’,N’???? ????’)

–View Table data

SELECT * FROM TBL_LANG


Comments

Leave a comment on the original post [mssqlfun.com, opens in a new window]

Loading comments...