Select just the first two letters in a column (MySQL)
| From: | John Guynn | Date: | Thu, 08 Mar 2001 14:47:41 +0000 |
| Subject: | Select just the first two letters in a column (MySQL) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-7203@lists.php.net to get a copy of this message | ||
Is there a way to select just the first two letters in a column? I have a
column that contains values like TT1, TT2, TT3, TT4, PR1, PR2, RD1, RD2,
RD3, and I'd like to SELECT DISTINCT the first two letters. In otherwords
have the select statement return TT, PR, RD.
Any ideas?
John Guynn
This email brought to you by RFCs 821 and 1225.