Posted on Updated on

Objectives

 

  • Describe various types of functions that are

available in SQL

  • Use character, number, and date functions in

SELECT statements

  • Describe the use of conversion functions

 

 

 

 

 

Single-Row Functions

  • Manipulate data items
  • Accept arguments and return one value
  • Act on each row that is returned
  • Return one result per row
  • May modify the data type
  • Can be nested
  • Accept arguments that can be a column or an

Expression

Type of Single Row Functions:      

 

 

 

 

Type of Character Functions:

 

 

Case-Manipulation Functions

 

Ø Lower ( ) Example

The following SQL statement selects the “ENAM” columns from the “EMP” table, and converts the “ENAME” column to lowercase:

SQL> select lower(ename) from emp;

 

LOWER(ENAM

———-

smith

allen

ward

jones

martin

 

Ø  Upper ( ) Example

The following SQL statement selects the “ENAME” columns from the “EMP” table, and converts the “ENAME” column to uppercase:

SQL> SELECT UPPER(ENAME) FROM EMP;

UPPER(ENAM

———-

SMITH

ALLEN

WARD

JONES

Ø  Initcap ( ) Example

The following SQL statement INITCAP convert the first letter of each word to uppercase and remaining letters to lowercase.

SQL> SELECT INITCAP(ENAME) FROM EMP;

INITCAP(EN

———-

Smith

Allen

Ward

Jones

Using Case-Manipulation Functions:

************************************************************************

For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.
Helpline: 9814666333, 8699444666
Email: info@technocampus.co.in

Please fill the form and we shall contact you soon.

Leave a comment