bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MS Access Mid() Function

Concept visual

MS Access Mid() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Extract characters from a string, starting at position 3:

SELECT Mid("SQL Tutorial", 3) AS ExtractString;

Definition and Usage

The Mid() function extracts some characters from a string (starting at any position).

Syntax

Mid(

string, start, length )

Parameter Values

Parameter

Description string

Required. The string to extract from start Required. The start position length Optional. The number of characters to extract. If omitted, this function returns all characters from the start position

Technical Details

Works in:

From Access 2000

More Examples

Example

Extract characters from the text in a column (start at position 4, and extract 6 characters): SELECT Mid(CustomerName, 4, 6) AS ExtractString

FROM Customers;

Previous

❮ MS Access Functions

Next

Previous

MS Access LTrim() Function

Next

MS Access Replace() Function