Open In App

Mid() and Len() Function in MS Access

Last Updated : 01 Sep, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
1. Mid() function : In MS Access the mid() function will extract the string from a given position. In this function 3 parameters will be passed first will be the string and second will be the starting position and last will be the length of the string. Syntax :
Mid(string, start, length)
Example-1 :
SELECT Mid("GEEKSFORGEEKS", 3, 3) AS ExtractString;
Output -
ExtractString
EKS
Example-2 :
SELECT Mid("GEEKSFORGEEKS", 6, 14) AS ExtractString;
Output -
ExtractString
FORGEEKS
2. Len() function : In MS Access the Len() function will return the length of the string. It will take the string as a parameter and it will return the length of the string. Syntax :
Len(string/varname)
Example-1 :
SELECT Len("GEEKSFORGEEKS") AS LengthOfString;
Output -
LengthOfString
13
Example-2 :
SELECT Len("GFG") AS LengthOfString;
Output -
LengthOfString
3

Next Article
Article Tags :
Practice Tags :

Similar Reads