📌  相关文章
📜  在sql代码示例中获取逗号分隔字符串中最左边的单词

📅  最后修改于: 2022-03-11 15:05:33.790000             🧑  作者: Mango

代码示例1
SELECT SUBSTRING_INDEX(address, ',', 4) FROM employees;
+-----------+------------------------------------+
| name      | SUBSTRING_INDEX(address, ',', 4)   |
+-----------+------------------------------------+
| John Doe  | 4225 Collins Street,Apt. A,Erie,PA |
| Bob Smith | 234 Main Street,,Erie,PA           |
+-----------+------------------------------------+