Table of ContentsPreviousNext

Ispirer             Ispirer


Ispirer SQLWays Database Migration Software

SUBSTRING

Syntax

SUBSTRING(expr, start, length)

SUBSTRING returns part of a character, binary or text expression beginning at start position, length characters (bytes) long.

Example

This example returns the full first name in one column, and only the first initial in the second column.

SELECT au_fname, SUBSTRING(au_fname, 1, 1)
FROM authors 
Here is the result set: 
au_fname
_____________________
Albert               A
Ann                  A
Anne                 A
Michael              M
Michel               M 

Equivalents in other databases

TABLE 96. Equivalents in other databases
IBM DB2
SUBSTR function
Oracle
SUBSTR function


Table of ContentsPreviousNext
Ispirer             Ispirer
Copyright © 1999-2015 Ispirer Systems Ltd. Ispirer and SQLWays are trademarks of Ispirer Systems Ltd. All other product names may be trademarks of the respective companies. All rights reserved.