mySql  upper function

the mysql upper function converts the string value of a field to uppercase.

mysql upper() syntax

         select    upper(column_name or s_expre)    from   table_name;

the ucase(str) is a synonym for upper()

         select    ucase(column_name or s_expre)    from   table_name;

this demo database table use in the below upper function example

below is a selection from the "users" table:

useridfirstnamesalarybonus
1sandeep10,0001000
2ankit20,0002000
3ram30,0003000
4vikash12,0002000

mysql upper function example

the following mysql statement selects the 'firstname' 'salary' columns from the "users" table, and convert the 'firstname' column to uppercase.

               
               select    upper(firstname)        from    users;

output :

firstname()salary
sandeep1000
ankit2000
ram3000
vikash2000