Returns multiple characters from the beginning of a string.
LEFT( string-expression, integer-expression )
string-expression The string.
integer-expression The number of characters to return.
LONG VARCHAR
LONG NVARCHAR
If the string contains multibyte characters, and the proper collation is being used, the number of bytes returned may be greater than the specified number of characters.
You can specify an integer-expression that is larger than the value in the argument string expression. In this case, the entire value is returned.
Whenever possible, if the input string uses character length semantics the return value will be described in terms of character length semantics.
SQL/2003 Vendor extension.
The following statement returns the first 5 characters of each Surname value in the Customers table.
SELECT LEFT( Surname, 5) FROM Customers; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |