LEFT(, ) : LEFT « String « SQL / MySQL






LEFT(, )

     
mysql>
mysql> SELECT LEFT('cats and dogs', 4);
+--------------------------+
| LEFT('cats and dogs', 4) |
+--------------------------+
| cats                     |
+--------------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
    
  








Related examples in the same category

1.Strip off the last three characters (the LENGTH( ) function returns the length of a string)
2.Get from left of a string
3.For each player whose last name starts with the capital B