?????MySQL???ж??????????
???????????? ???????[ 2015/12/18 11:03:24 ] ?????????????
?????? ???
????3.1 ????? ???????
mysql> SELECT * FROM user G;
*************************** 1. row ***************************
name: robin
*************************** 2. row ***************************
name: ?1???
2 rows in set (0.00 sec)
mysql> SELECT name??
-> CASE name REGEXP "[u0391-uFFE5]"
-> WHEN 1 THEN "???????????"
-> ELSE "?????????"
-> END AS "?ж?????????????"
-> FROM user;
+
-----------+-----------------------------+
| name | ?ж????????????? |
+
-----------+-----------------------------+
| robin | ??????????? |
| ?1??? | ????????? |
+
-----------+-----------------------------+
2 rows in set (0.00 sec)
mysql> SELECT name FROM user WHERE NOT (name REGEXP "[u0391-uFFE5]");
+
-----------+
| name |
+
-----------+
| ?1??? |
+
-----------+
1 row in set (0.00 sec)
????3.2 ?????? length() ?? char_length()
mysql> SELECT name?? length(name)?? char_length(name) FROM user;
+
-----------+--------------+-------------------+
| name | length(name) | char_length(name) |
+
-----------+--------------+-------------------+
| robin | 5 | 5 |
| ?1??? | 20 | 9 |
+
-----------+--------------+-------------------+
2 rows in set (0.00 sec)
mysql> SELECT name FROM user WHERE length(name) char_length(name);
+
-----------+
| name |
+
-----------+
| ?1??? |
+
-----------+
1 row in set (0.00 sec)
?????? ???
??????????У?[u0391-uFFE5] ?????????????????
???????????У?????????UTF-8?????????????????length() ?? char_length() ??????????????????????
?????ο?????????
????LENGTH()
????Return the length of a string in bytes
????Returns the length of the string str?? measured in bytes. A multibyte character counts as multiple bytes. This means that for a string containing five 2-byte characters?? LENGTH() returns 10?? whereas CHAR_LENGTH() returns 5.
????CHAR_LENGTH()
????Return number of characters in argument
????Returns the length of the string str?? measured in characters. A multibyte character counts as a single character. This means that for a string containing five 2-byte characters?? LENGTH() returns 10?? whereas CHAR_LENGTH() returns 5.
?????? Ref
????12.5 String Functions
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???mysql?????????????mysql????? distinct?÷?MySQL?н???????????з??Mysql?????????MySQL Cluster??δ????????????????ν?MySQL??????????300???????MySQL???Uber???????????????????MySql SQL??????????MySQL?????????????????λЧ?????SQL???Java???????:?????MySQL???????linux?°??mysql????MySQL ???????????????????binlog??MySQL????????????Щ??????MySQL???????Mysql???????JDBC?????mysql?????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????