当前位置:网站首页>oracle数据库中列转行,列会有变化
oracle数据库中列转行,列会有变化
2022-08-11 07:06:00 【CSDN问答】
在oracle数据库中,查询出来的临时表如下

如何转换成下图

注意:分类是会增加的,也就是说在8月3日的时候,分类就多了“武侠”、“军事”等其他不确定的类型
源码如下:
INSERT INTO sheet1(日期, 分类, 数量) VALUES ('2022-08-01 ', '玄幻', '10');
INSERT INTO sheet1(日期, 分类, 数量) VALUES ('2022-08-01', '言情', '11');
INSERT INTO sheet1(日期, 分类, 数量) VALUES ('2022-08-01', '修真', '12');
INSERT INTO sheet1(日期, 分类, 数量) VALUES ('2022-08-02 ', '玄幻', '15');
INSERT INTO sheet1(日期, 分类, 数量) VALUES ('2022-08-02 ', '言情', '16');
INSERT INTO sheet1(日期, 分类, 数量) VALUES ('2022-08-02 ', '修真', '17');
INSERT INTO sheet1(日期, 分类, 数量) VALUES (NULL, NULL, NULL);
INSERT INTO sheet1(日期, 分类, 数量) VALUES (NULL, NULL, NULL);
边栏推荐
- 1101 B是A的多少倍 (15 分)
- 1061 True or False (15 points)
- 项目2-年收入判断
- 为什么C#中对MySQL不支持中文查询
- One-hot in TF
- 1002 Write the number (20 points)
- Redis source code-String: Redis String command, Redis String storage principle, three encoding types of Redis string, Redis String SDS source code analysis, Redis String application scenarios
- Decrement operation in tf; tf.assign_sub()
- 【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
- 1.1-Regression
猜你喜欢

Do you know the basic process and use case design method of interface testing?

1056 组合数的和 (15 分)

1076 Wifi Password (15 points)

1091 N-自守数 (15 分)

1096 big beautiful numbers (15 points)

Write a resume like this, easy to get the interviewer

The growth path of a 40W test engineer with an annual salary, which stage are you in?

Pico neo3 Unity Packaging Settings

年薪40W测试工程师成长之路,你在哪个阶段?

1002 写出这个数 (20 分)
随机推荐
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
Find the latest staff salary and the last staff salary changes
TF中的四则运算
基于微信小程序的租房小程序
少年成就黑客,需要这些技能
How Unity programmers can improve their abilities
2022年中国软饮料市场洞察
Redis source code: how to view the Redis source code, the order of viewing the Redis source code, the sequence of the source code from the external data structure of Redis to the internal data structu
记录一些遇见的bug——Lombok和Mapstruct的冲突导致,A component required a bean of type ‘com.XXX.controller.converter.
2.1 - Gradient Descent
TF中的条件语句;where()
tf中自减操作;tf.assign_sub()
动态代理学习
我的创作纪念日丨感恩这365天来有你相伴,不忘初心,各自精彩
1003 I want to pass (20 points)
Activity的四种启动模式
详述MIMIC 的ICU患者检测时间信息表(十六)
1003 我要通过 (20 分)
C语言每日一练——Day02:求最小公倍数(3种方法)
Tidb二进制集群搭建