You are on page 1of 3

Numeric Functions: These are functions that accept numeric input and return numeric values.

The Implementation of these Numeric Functions can be understood from following examples:

125.5

-54
Character or Text Functions: Following are some frequently used char functions:

Following examples illustrate the usage of these functions.

trim('g' FROM 'good morning') ood mornin

REPLACE

Replaces a given set of characters in a string with another set of characters.

Example

The following query replaces “mohd” with “mohammed” .

select replace('ali mohd khan','mohd','mohammed') from dual;

CONCAT

Combines a given string with another string.


Example

Select concat(concat(first_name,' and '),last_name) As “Fullname” from employees order by first_name;

The INSTR() function searches for a substring in a string and returns the position of the substring in a
string.

Syntax

INSTR(string , substring)

Example:

SELECT INSTR( 'This is a playlist', 'is' ) as “substring location” FROM dual;

Aggregate Functions (Group Functions):

A group function is an SQL function that returns a single result based on many rows, as opposed to
single-row functions.

You might also like