Mysql LEFT
From w3cyberlearnings
Contents |
MySQL LEFT Function
This function returns a substring based from the left side.
Syntax LEFT
- STR: A String input
- Length: Length to return
LEFT(STR,length);
Example 1
mysql> SELECT LEFT('she sees them',3); +-------------------------+ | LEFT('she sees them',3) | +-------------------------+ | she | +-------------------------+ 1 row in set (0.00 sec)
Example 2
mysql> SELECT LEFT('she sees them',8); +-------------------------+ | LEFT('she sees them',8) | +-------------------------+ | she sees | +-------------------------+ 1 row in set (0.00 sec)