本文介绍了如何合并来自同一个表的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想将同一个表的两列合并为一个,只显示选定的列。我有这样的sql表。 S.no位置日期时间状态 1 xyz 2014-6-6 10 :55 in 2 abc 2014-6-6 4:30 out 3 mno 2014-6-7 11:00 in 4 mop 2014-6-7 4:00 out 5 abc 2014-6-8 11:00在 这里,我想合并列以显示基于相同日期的一列。所需格式为 s.no LocationIn LocationOut date timeIN timeout 1 xyz abc 2014-6-6 10: 55 4:30 2 mno mop 2014-6-7 11:00 4:00 3 abc 2014-6-8 11:00 i只使用了加入返回日期,但不知道怎么做..有谁能告诉我这是怎么做的?提前谢谢解决方案 i wanted to merge two columns of same table into one and show only selected column. I have sql table like this. S.no Location date time Status 1 xyz 2014-6-6 10:55 In 2 abc 2014-6-6 4:30 out 3 mno 2014-6-7 11:00 In 4 mop 2014-6-7 4:00 out 5 abc 2014-6-8 11:00 In Here, i wanted to merge columns to show one column based on same date. The required format is s.no LocationIn LocationOut date timeIN timeout 1 xyz abc 2014-6-6 10:55 4:30 2 mno mop 2014-6-7 11:00 4:00 3 abc 2014-6-8 11:00 i had used join to return date only but had no idea on how to do.. can anyone tell me how this could be done?? thanks in advance 解决方案 这篇关于如何合并来自同一个表的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-18 19:46