mysql把一字段拆分为多行
2024-08-25 02:23:16
sql语句
select a.house_no as '房子',substring_index(substring_index(a.name,',',b.help_topic_id+1),',',-1) as '拥有者'
from aa a
join mysql.help_topic b on b.help_topic_id < (length(a.name) - length(replace(a.name,',',''))+1);
关键点
mysql.help_topic b on b.help_topic_id < (length(a.name) - length(replace(a.name,',',''))+1)
name格式:张三,李四,王五
最新文章
- Spring 配置 Spring JPA 发生错误的解决方法
- Atitit 五种IO模型attilax总结&#160;blocking和non-blocking&#160;synchronous IO和asynchronous I
- HTML 父元素与子元素之间的margin-top问题
- mysql已有数据字符集转换
- poj邮局1160
- mysql 多表联合更新
- Spring框架学习之第5节
- tree命令
- attr
- StaggeredGridView+universal-image-loader载入网路图片实现瀑布流
- 每位iOS开发人员不容错过的10大实用工具
- 关于oracle数据库(5)增删改查
- JAVA 命令行参数解析,org.apache.commons.cli的使用
- 关于H5页面中生成图片的两种方式!
- ASP.NET Core学习之五 EntityFrameworkCore
- MVP技术沙龙上海站-SQL BI
- MQ与webservice的区别,MQ的区别
- [转]shell awk sed tr grep 语法汇总
- Codeforces Round #419 A+B
- P4语法(4)Control block
热门文章
- Kubernetes(一)--简介
- Oracle特殊查询 行列倒转 分页
- VUE 采坑之旅-- Mint-ui 按需引入报出Module build failed: Error: Couldn&#39;t find preset ";es2015"; relative to directory ";C:\\phpStudy\\PHPTutorial\\WWW\\text\\vuep\\vue-demo";
- 使用mock.js进行数据模拟
- verilog中初值定义
- 将python自动转换为.exe文件
- BZOJ 小Z的袜子 2038 国家集训队
- Python之路(四)--->;list、元组、字典
- 转:c# Linq 的分页[转]
- Java第五次实验报告