Skip to content
Related Articles
Open in App
Not now

Related Articles

Left() and Right() Function in MS Access

Improve Article
Save Article
Like Article
  • Last Updated : 02 Sep, 2020
Improve Article
Save Article
Like Article

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
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!