📜  MySQL字符串

📅  最后修改于: 2020-11-21 08:31:03             🧑  作者: Mango

MySQL字符串函数

MySQL的字符串函数有效操作<字符>数据。下表简要说明了每个功能:

例子1

SELECT SOUNDEX('javatpoint');

输出:

mysql> SELECT SOUNDEX('javatpoint');
+-----------------------+
| SOUNDEX('javatpoint') |
+-----------------------+
| W6262                 | 
+-----------------------+
1 row in set (0.00 sec)

例子2

SELECT ORD('mysql');

输出:

mysql> SELECT ORD('mysql'); 
+-------------------+
| ORD('mysql') |
+-------------------+
|               109 | 
+-------------------+
1 row in set (0.00 sec)

例子3

SELECT REPEAT('*+*',15);

输出:

mysql> SELECT REPEAT('*+*',15); 
+-----------------------------------------------+
| REPEAT('*+*',15)                              |
+-----------------------------------------------+
| *+**+**+**+**+**+**+**+**+**+**+**+**+**+**+* | 
+-----------------------------------------------+
1 row in set (0.03 sec)