Examples of other string functions

Most of the remaining string functions are easy to use and understand.

Table 16-4: String function examples

Statement

Result

select right("abcde", 3)

cde 

select right("abcde", 6)

abcde 

select right(0x12345000, 3)

0x345000

select right(0x12345000, 6)

0x12345000

select upper("torso")

TORSO 

select ascii("ABC")

65