Skip to content
Related Articles

Related Articles

Improve Article

Left() and Right() Function in MS Access

  • Last Updated : 02 Sep, 2020

1. Left() Function :
In MS Access the Left() function extract the string from the left of the string. In Left() function The string and the no of the string will be passed. And it will return the string of size the pass number from the left of the string.

Syntax :

Left(string, number_of_chars)

Example-1 :

SELECT Left("GEEKSFORGEEKS", 3) AS ExtractString;

Output –

ExtractString
GEE

Example-2 :



SELECT Left("GEEKSFORGEEKS", 10) AS ExtractString;

Output –

ExtractString
GEEKSFORGE&

2. Right() Function :
The Right() function works like Left() function but it extracts the string from the right end of the string. In this, the string and the size of the string that will be extracted will pass as a parameter.

Syntax :

Right(string, number_of_chars)

Example-1 :

SELECT Right("GEEKSFORGEEKS", 4) AS ExtractString;

Output –

ExtractString
EEKS

Example-2 :

SELECT Right("GEEKSFORGEEKS", 8) AS ExtractString;

Output –

ExtractString
FORGEEKS
My Personal Notes arrow_drop_up
Recommended Articles
Page :