hi,
char is fixed length character data
varchar is variable length character data
nvarchar is for storing multi language characters
declare @charData char(10), @varcharData varchar(10) , @nvarcharData nvarchar(10)
set @charadata = 'chandu'
set @varchardata ='chandu'
set @nvarchardata ='chandu'
select @chardata, @varchardata, @nvarchardata
in the above sample data 1st variable stores data with remaining blank space padding('chandu ')
i.e. stores 10 chars data even though the data is 6 chars.....
2nd variable stores only 6 chars data in the memory.....
3rd variable can support chinese, japanese and so on.....
char(10) means even though you have
Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif
Pkanwar, if this helps please login to Mark As Answer. | Alert Moderator