THE WORLD'S LARGEST WEB DEVELOPER SITE

MS Access Left() Function

❮ MS Access Functions

Example

Extract a substring from a string (starting from left):

SELECT Left("SQL Tutorial", 3) AS ExtractString;
Try it Yourself »

Definition and Usage

The Left() function extracts a substring from a string (starting from left).

Syntax

Left(string, number_of_chars)

Parameter Values

Parameter Description
string Required. The string to extract from
number_of_chars Required. The number of characters to extract

Note

  • If number_of_chars exceeds the number of characters in string, the Left() function will return string

Technical Details

Works in: Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

More Examples

Example

Extract a substring from the text in a column (starting from left):

SELECT Left(CustomerName, 5) AS ExtractString
FROM Customers;
Try it Yourself »

❮ MS Access Functions