当前位置:网站首页>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);
边栏推荐
猜你喜欢
记录一些遇见的bug——Lombok和Mapstruct的冲突导致,A component required a bean of type ‘com.XXX.controller.converter.
1046 punches (15 points)
1076 Wifi Password (15 points)
语音信号处理:预处理【预加重、分帧、加窗】
Pico neo3 Unity Packaging Settings
Tensorflow中使用tf.argmax返回张量沿指定维度最大值的索引
Use tf.argmax in Tensorflow to return the index of the maximum value of the tensor along the specified dimension
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
年薪40W测试工程师成长之路,你在哪个阶段?
CSDN21天学习挑战赛——封装(06)
随机推荐
1036 跟奥巴马一起编程 (15 分)
Use tf.argmax in Tensorflow to return the index of the maximum value of the tensor along the specified dimension
公牛10-11德里克·罗斯最强赛季记录
matrix multiplication in tf
Service的两种状态形式
无服务器+域名也能搭建个人博客?真的,而且很快
redis操作
结合均线分析k线图的基本知识
There may be fields that cannot be serialized in the abnormal object of cdc and sqlserver. Is there anyone who can understand it? Help me to answer
【LeetCode】链表题解汇总
Conditional statements in TF; where()
Production and optimization of Unity game leaderboards
计算YUV文件的PSNR与SSIM
2022-08-10 Group 4 Self-cultivation class study notes (every day)
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
经典论文-MobileNet V1论文及实践
The most complete documentation on Excel's implementation of grouped summation
linux 安装mysql服务报错
为什么我使用C#操作MySQL进行中文查询失败