SQL SERVER TUTORIAL IN DEPTH

The blog is to help users about sql server

Others

LightBlog

Breaking

Saturday, 21 December 2013

Unicode vs Ascii in sql server


select unicode('A')--65
select unicode('a')--97
select unicode('Abfdgdfg')--65
select unicode('12')--49


select ascii('A')--65
select ascii('a')--97
select ascii('Abfdgdfg')--65
select ascii('12')--49

select substring('anurag',3,3)--ura
select UNICODE(SUBSTRING('anurag', 3, 3));--117
select ascii(SUBSTRING('anurag', 3, 3))--117




 SELECT PATINDEX('%en_ure%', 'please ensure the door is locked');--8
 SELECT PATINDEX('%l%', 'please ensure the door is locked');--2
 SELECT PATINDEX('%do%', 'please ensure the door is locked');--19

No comments:

Post a Comment

 test