Table of ContentsPreviousNext

Database Migration


LEFT

Syntax

LEFT(char_expr, int_expr)

LEFT returns int_expr leftmost characters of char_expr.

Example

This example returns the five leftmost characters of each book title.

SELECT LEFT(title, 5)
FROM titles

Here is the result set:

__________________

The B
Cooki
You C
The G
The P

Equivalents in other databases

TABLE 82. Equivalents in other databases
IBM DB2
LEFT function
Oracle
SUBSTR function


Ispirer Systems
http://www.ispirer.com
ispirer@ispirer.com
Table of ContentsPreviousNext