SQL Server select 将类型相同的行合并

时间:2014-05-09 19:18:43   收藏:0   阅读:339

select Category from(select distinct Category from T_Detail where CREATED_BY= @CREATED_BY AND RecordDate>=@RecordDate1 AND RecordDate<@RecordDate2)t group by Category

说明: CREATED_BY 为创建人ID

        RecordDate为创建日期

SQL Server select 将类型相同的行合并,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!