值列
count和distinct
count和distinctdistinct和distinctive⼀.count和distinctcount是统计数据条数,distinct是去掉重复列;count统计的时候会忽略null值,distinct会将重复的null值列作为⼀个。综上select count(null) from table,结果永远是0。⼆.count的⼏种形式常见到count(*),count(1),count(f...
oracle中SQL语句查询后;拼接列;拼接行
oracle中SQL语句查询后;拼接列;拼接⾏1.拼接多的值列这是横向凭借=== 同⼀⾏数据不同列的拼接===SELECT RIP.P_TS ||','|| RIP.P_DTFROM RI_PAY RIP where RIP.O_NBR='RI201503240002'查询结果: 1427185223921,2015-03-182.拼接多⾏数据select wm_concat(P_T...