SESSION NAME: SQL Functions - 2.

QUESTION NAME:  MID FUNCTION - SCALAR FUNCTION - NAME column.


TABLE DESCRIPTION:
MID Function:

MID Function has three parameters:

First Parameter = Column Name
Second Parameter = Start Length
Third Parameter = Length of characters to be displayed
Note: Index starts from 1.

Example:

MID(column_name, start, length) from table-name;

Write a FUNCTION to display the name column of
employee table using mid function.


The start length (index) is 1 and display total of 3
characters in name column.


Table Name : emp
Columns

eid - Number
name - varchar
age - Number
salary - Number.

CODE:
select mid(name,1,3) from emp;