get first word from string mysql code example

Example: select first character of string mySql

mysql> SELECT pub_name, LEFT(pub_name, 5) 
    -> FROM publisher;
+------------------------------+-------------------+
| pub_name                     | LEFT(pub_name, 5) |
+------------------------------+-------------------+
| Jex Max Publication          | Jex M             | 
| BPP Publication              | BPP P             | 
| New Harrold Publication      | New H             | 
| Ultra Press Inc.             | Ultra             | 
| Mountain Publication         | Mount             | 
| Summer Night Publication     | Summe             | 
| Pieterson Grp. of Publishers | Piete             | 
| Novel Publisher Ltd.         | Novel             | 
+------------------------------+-------------------+
8 rows in set (0.00 sec)

Tags:

Sql Example