当前位置:网站首页>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);
边栏推荐
- 1.1-回归
- Interaction of Pico neo3 in Unity
- 2022-08-10 Group 4 Self-cultivation class study notes (every day)
- Square, multi-power, square root calculation in Tf
- Write a resume like this, easy to get the interviewer
- 1071 Small Gamble (15 points)
- Service的两种启动方式与区别
- Two state forms of Service
- 少年成就黑客,需要这些技能
- 【软件测试】(北京)字节跳动科技有限公司终面HR面试题
猜你喜欢

About # SQL problem: how to set the following data by commas into multiple lines, in the form of column display

囍楽cloud task source code

tf中自减操作;tf.assign_sub()

tf.cast(), reduce_min(), reduce_max()

1091 N-Defensive Number (15 points)

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

1003 我要通过 (20 分)

基于微信小程序的租房小程序

【Pytorch】nn.ReLU(inplace=True)

Distributed Lock-Redission - Cache Consistency Solution
随机推荐
无服务器+域名也能搭建个人博客?真的,而且很快
为什么我使用C#操作MySQL进行中文查询失败
redis操作
1081 Check Password (15 points)
分布式锁-Redission - 缓存一致性解决
js根据当天获取前几天的日期
Dynamic Agent Learning
What are the things that should be planned from the beginning when developing a project with Unity?How to avoid a huge pit in the later stage?
cdc连sqlserver异常对象可能有无法序列化的字段 有没有大佬看得懂的 帮忙解答一下
Pytorch模型转ONNX模型
Pico neo3 Unity Packaging Settings
Activity的四种启动模式
Four states of Activity
Two state forms of Service
【Pytorch】nn.ReLU(inplace=True)
TF中使用softmax函数;
1046 punches (15 points)
线程交替输出(你能想出几种方法)
2.1-梯度下降
1091 N-Defensive Number (15 points)