简介 目录 评价 推荐
  • AppMan 2022-01-18

    列转行SQL语句:

    0赞 · 0采集
  • 斜杠男人 2021-02-23

    生成序列表步骤

    1)、create table tb_sequence(id int auto_increment not null, primary key(id))

    2)、insert into tb_sequence values(),(),(),(),(),(),(),(),(),();

    截图
    0赞 · 0采集
  • 斜杠男人 2021-02-22

    利用序列表处理列转换行的数据

    截图
    0赞 · 1采集
  • 慕粉1100306574 2020-10-11

    行转列sql

    截图
    0赞 · 0采集
  • 慕UI7932046 2019-09-18

    mysql 行转列

    http://img2.mukewang.com/5d81d41b00014af211700618.jpg

    截图
    0赞 · 0采集
  • 慕后端2376581 2019-08-13

    行转列语法

    截图
    0赞 · 0采集
  • 我私发我 2019-06-15

    使用序列化表的方法实现行转列

    select user_name, replace(substring(), char_length()) as mobile

    from tb_sequence a 

    cross join(

    select user_name, concat(mobile, ',') as mobile, length(mobile)-length(replace(mobile, ',', ''))+1 size

    from user1 b

    )b on a.id<b.size

    截图
    0赞 · 0采集
  • 慕桂英8254968 2019-04-10

    列转行

    select user_name,replace(substring(substring_index(mobile,','a.id),char_length(substring_index(mobile,',',a.id-1))+1),',','') as mobile from tb_sequence as a
    cross join(
    select user_name,concat(mobile,',') as mobile,length(mobile)-length(replace(mobile,',',''))+1 as size from user1 as b) as b on a.id<=b.size

     0


    0赞 · 0采集
  • 慕粉2123427705 2019-03-07
    最终实在列转行的sql
    截图
    0赞 · 0采集
  • 慕粉2123427705 2019-03-07
    列转行,最开始表的格式。
    截图
    0赞 · 0采集
  • 慕粉2123427705 2019-03-07

    建立序列表

    create  table tb_sequence(id int auto_increment not null,primary key(id))

    insert into tb_sequence values(),(),(),(),(),(),(),(),(),(),();

    截图
    0赞 · 0采集
  • 12344554 2019-03-06

    行转列数据处理sql语句


    截图
    0赞 · 0采集
  • 12344554 2019-03-06

    序列表中初始化数据

    create table tb_sequence(id int auto_increment not null,primary key(id))

    给自增列中初始化数据(数据多少,取决于()的多少)

    insert to tb_sequence values (),(),(),(),(),();

    截图
    0赞 · 0采集
  • 12344554 2019-03-06

    利用序列表处理列转行的数据

    截图
    0赞 · 0采集
  • 慕工程4308039 2018-12-18

    行列转换

    一列转多行

    https://img.mukewang.com/5c188d560001cc9e05450340.jpghttps://img4.mukewang.com/5c188d5c0001cc9e05450340.jpg

    0赞 · 0采集
  • qq_旭日阳光_1 2018-12-10

    列转行,唐僧  12,23,23,2转成唐僧 12  唐僧23https://img1.mukewang.com/5c0e112400010f8806980245.jpghttps://img1.mukewang.com/5c0e1146000116ee03230273.jpghttps://img2.mukewang.com/5c0e11100001f39804620282.jpg

    0赞 · 0采集
  • _Ambition_ 2018-11-12

    列转行

    select user_name,replace(substring(substring_index(mobile,','a.id),char_length(substring_index(mobile,',',a.id-1))+1),',','') as mobile from tb_sequence as a
    cross join(
    select user_name,concat(mobile,',') as mobile,length(mobile)-length(replace(mobile,',',''))+1 as size from user1 as b) as b on a.id<=b.size
    0赞 · 1采集
  • 慕沐8756185 2018-09-13

    利用序列化表处理列转行

    截图
    0赞 · 0采集
  • 慕沐8756185 2018-09-13

    创建一张序列化表并插入(行转列)

    截图
    0赞 · 0采集
  • qq_柯九思_0 2018-08-14

    alter table user1 add column mobile varchar(100)

    0赞 · 0采集
  • 我在努力you 2018-07-19
    再看一遍
    截图
    0赞 · 0采集
  • BirdOfV 2018-05-26

    @MySQL---利用序列表转行的数据

    SELECT user_name,
    REPLACE(SUBSTRING(SUBSTRING_INDEX(mobile,',',a.id),CHAR_LENGTH(SUBSTRING_INDEX(mobile,',',a.id-1))+1),',','') AS mobile FROM tb_sequence a CROSS JOIN(SELECT user_name,CONCAT(mobile,',') AS mobile,
    LENGTH(mobile)-LENGTH(REPLACE(mobile,',',''))+1 size
    FROM user1 b) b ON a.id<=b.size;
    0赞 · 1采集
  • 浮海沉香 2018-01-26
    行列转换
    截图
    0赞 · 0采集
  • LINGJINFA 2018-01-10
    666
    截图
    0赞 · 0采集
  • ZyLoveSnow 2017-11-26
    行转列: SELECT username,REPLACE(substring(SUBSTRING_INDEX(mobile,',',a.id), CHAR_LENGTH(SUBSTRING_INDEX(mobile,',',a.id-1))+1),',','') AS mobile FROM tb_sequence AS a CROSS JOIN (SELECT username, CONCAT(mobile,',') AS mobile, (LENGTH(mobile)-LENGTH(REPLACE(mobile,',',''))+1) AS size FROM user1) AS b ON a.id <= b.size;
    截图
    0赞 · 0采集
  • qq_霸气_亚强_03756285 2017-10-14
    列转行
    截图
    0赞 · 0采集
  • Go_勇往直前 2017-08-28
    Mysql列转行
    截图
    0赞 · 0采集
  • kingdompeak 2017-08-15
    行转列: SELECT username,REPLACE(substring(SUBSTRING_INDEX(mobile,',',a.id), CHAR_LENGTH(SUBSTRING_INDEX(mobile,',',a.id-1))+1),',','') AS mobile FROM tb_sequence AS a CROSS JOIN (SELECT username, CONCAT(mobile,',') AS mobile, (LENGTH(mobile)-LENGTH(REPLACE(mobile,',',''))+1) AS size FROM user1) AS b ON a.id <= b.size;
    1赞 · 2采集
  • 至高之拳 2017-08-05
    行转列
    截图
    0赞 · 0采集
  • 滕玉龙 2017-06-13
    利用序列表处理列转行的数据
    截图
    0赞 · 1采集
数据加载中...
开始学习 免费