How does MySQL use the first letter of the English word GROUP by?

Source: Internet
Author: User
How does MySQL use the first letter of the English word group by???
There is a field content that is in English, how do I use the first letter of the English word group by this field??
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, up to) from TableName
GROUP by substr (field content, *) have (add some of your own restrictions)
------------------------------------
Perhaps I understand your question is not correct, please put the question slightly more detailed ah, thank you!
In fact, this problem, you can go to Google on their own search, so efficiency will be higher.

------Solution--------------------
Mysql> select * from A;
+-----+------------+
| Aid | Title |
+-----+------------+
| 1 | csdn |
| 2 | csdn |
| 3 | 666 |
| 4 | 343 |
| 5 | (NU |
| 6 | 343 |
| 8 S FGH |
| 8 | 676 |
| 9 | csdn |
| 10 | csdn |
| 11 | AAA[A]ABCD |
| 89 | Sfsdfsaf |
+-----+------------+
Rows in Set (0.00 sec)

Mysql> SELECT * from a ORDER by substring (LCase (title), 1, 1);
+-----+------------+
| Aid | Title |
+-----+------------+
| 5 | (NU |
| 4 | 343 |
| 6 | 343 |
| 3 | 666 |
| 8 | 676 |
| 11 | AAA[A]ABCD |
| 1 | csdn |
| 2 | csdn |
| 9 | csdn |
| 10 | csdn |
| 7 | FGH |
| 89 | Sfsdfsaf |
+-----+------------+
Rows in Set (0.01 sec)
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.