//CASE MANIPULATION FUNCTION
UPPER()
lOWER()
INITCAP()
Select Upper(First_name) ,Lower( Last_name) , Initcap(First_name) from Employees;
UPPER(FIRST_NAME) LOWER(LAST_NAME) INITCAP(FIRST_NAME)
-------------------- ------------------------- --------------------
ELLEN abel Ellen
SUNDAR ande Sundar
MOZHE atkinson Mozhe
DAVID austin David
HERMANN baer Hermann
SHELLI baida Shelli
// The above query is the example of case manipulation function
SQL> Select Upper(First_name) ,Lower( Last_name) ,Initcap(First_name) from Employees where First_name= 'ellen';
no rows selected
Here string is case sensitive in the SQL so no data found is query result but the name ellen is in the employees table but its case sensitive.so we move to use the case manipulation function in the where clause.
SQL> Select Upper(First_name),Lower( Last_name), Initcap(First_name) from Employees
where lower(First_name)= lower('ellen');
UPPER(FIRST_NAME) LOWER(LAST_NAME) INITCAP(FIRST_NAME)
-------------------- ------------------------- --------------------
ELLEN abel Ellen
No comments:
Post a Comment