How does mysql use the first letter of an English word groupby ??? There is a field & nbsp; the content is in English. how do I use the group & nbsp; by field as the first letter of an English word ?? No clue. thank you! ------ Solution ------------------ select *, upper (left (engishword, 1) ascfromtablenam mysql how to use the first letter of an English word group ???
How can I use the group by field, which is the first letter of an English word ??
No clue. thank you!
------ Solution --------------------
Select *, upper (left (englishword, 1) as c
From tablename
Group by c
------ Solution --------------------
SELECT evalue
FROM tablename
Group by left (upper (rtrim (ltrim (evalue), 1)
------ Solution --------------------
SELECT substr (field content, 1, 1) FROM tablename
Group by substr (field content, 1, 1) HAVING (add some constraints you need)
------------------------------------
Maybe I did not understand your question correctly. please give me more details. thank you!
In fact, you can search for this problem on Google by yourself, which is more efficient.
------ Solution --------------------
Mysql> select * from;
+ ----- + ------------ +
| Aid | title |
+ ----- + ------------ +
| 1 | csdn |
| 2 | csdn |
| 3 | 666 |
| 5 | 343 |
| 5 | (NU |
| 6 | 343 |
| 7 | fgh |
| 9 | 676 |
| 9 | csdn |
| 10 | csdn |
| 11 | aaa [A] abcd |
| 89 | sfsdfsaf |
+ ----- + ------------ +
12 rows in set (0.00 sec)
Mysql> select * from a order by substring (lcase (title), 1, 1 );
+ ----- + ------------ +
| Aid | title |
+ ----- + ------------ +
| 5 | (NU |
| 5 | 343 |
| 6 | 343 |
| 3 | 666 |
| 9 | 676 |
| 11 | aaa [A] abcd |
| 1 | csdn |
| 2 | csdn |
| 9 | csdn |
| 10 | csdn |
| 7 | fgh |
| 89 | sfsdfsaf |
+ ----- + ------------ +
12 rows in set (0.01 sec)