Previous Topic

Next Topic

Mid - SQL Function

Mid(String: String, Start: Number[, Length: Number]): String

Returns a sub-string of String, starting at character number Start, that is Number characters long.

If Length is specified and there are more than Length characters in the string starting at start then Length characters are returned, or all characters from start to the end of the string are returned.

Mid function syntax has these named arguments:

Parameter

Description

String

Required. String to return the mid characters for.

Start

Required. The first character to return string characters.

Length

Optional. The length of the string to be returned.

For example:

  Mid("credit", 2, 3)

Returns: red

See Also

SQL String Functions

Book Contents

Book Index