Sunday 4 December 2011

SQL Upper() and Lower ( )



                                                                SQL UPPER()


The UPPER() function converts the value of a field to uppercase.

Syntax

SELECT UPPER(column_name) FROM table_name


The "Custamast" table

custcode
custname
city
qty
rate
1
Siva
Srivilliputtur
50
70
2
Bala
Sivakasi
30
56
3
Kanna
Madurai
100
200
4
Vijay
Chennai
30
30
5
Kodee
Sandnes
60
80
5
Kodee 
Srivilliputtur
60
30


Sql Upper() Example 

SELECT UPPER(Custname) FROM custmast

custname
SIVA
BALA
KANNA
VIJAY
KODEE
KODEE


                                                     

                                                                SQL LOWER()


The LOWER() function converts the value of a field to lowercase

 

Syntax

SELECT LOWER(column_name) FROM table_name


SQL LOWER() Example

SELECT LOWER(Custname) FROM custmast


custname
siva
bala
kanna
vijay
kodee
kodee


0 comments:

Post a Comment

Followers

Powered by Blogger.