将多行合并为一行 [英] Combine multiple rows into one row
本文介绍了将多行合并为一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
DelayTime:
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
这是我的日期专栏&时间我想把所有时间一起添加回来像这样一行:
延迟时间:
1900-01-01 00:00 :00.000
This is my column of date & time i want to return all the time added together as one row like this:
Delaytime:
1900-01-01 00:00:00.000
推荐答案
我想你只想在表中显示不同的值,你可以使用SELECT DISTINCT语句。 DISTINCT关键字可用于仅返回不同的值。
I guess you want to display only the different values in the table and you can use SELECT DISTINCT statement. The DISTINCT keyword can be used to return only different values.
SELECT DISTINCT Delaytime
FROM table_name
从table_name中选择不同的Delaytime
select distinct Delaytime from table_name
这篇关于将多行合并为一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文