COMPUTER LEARNING CENTER
WWW.HUUKHANG.COM
Order by CustID
Keát quaû traû veà nhö sau:
CustID
---------- ----------- -------------------------
16 7 2956562368 1.95713899 26000 422366052
12
9 3843022604 39879489
459162 427002511
13 8 145913378 1.36727628 230000 18239172.25
10
4 72382804 48168567
2903576 18095701
5.3.2. Caùc haøm xöû lyù chuoãi
¾
Haøm ASCII: Haøm traû veà giaù trò maõ ASCII cuûa kyù töï beân traùi cuûa chuoãi, ví duï nhö khai baùo:
Select
ASCII('TOI')
Keát quaû traû veà nhö sau:
84
¾
Haøm Char: Haøm naøy chuyeån ñoåi kieåu maõ ASCII töø soá nguyeân sang daïng chuoãi:
Select
char(35)
Keát quaû traû veà nhö sau:
#
¾
Haøm UPPER: Haøm naøy chuyeån ñoåi chuoãi sang kieåu chöõ hoaï:
Select
UPPER('Khang')
Keát quaû traû veà nhö sau:
KHANG
¾
Haøm LOWER: Haøm naøy chuyeån ñoåi chuoãi sang kieåu chöõ thöôøngï:
Select
LOWER('Khang')
Keát quaû traû veà nhö sau:
khang
¾
Haøm Len: Haøm naøy traû veà chieàu daøi cuûa chuoãi:
Select len('I Love You')
Keát quaû traû veà nhö sau:
10
¾
Thuû tuïc LTRIM: Thuû tuïc loaïi boû khoaûng traéng beân traùi cuûa chuoãiï:
Select ltrim(' Khang')
Keát quaû traû veà nhö sau:
'khang'
Giaùo vieân: Phaïm Höõu Khang