sum(nvl(x,0)) where to_char(fodate,'yyyy-mm')=to_char(sysdate,'yyyy-mm') where Fyear=to_char(sysdate,'yyyy') where to_char(to_date(fyear,'yyyy'),'yyyy')=to_char(sysdate,'yyyy')
sum(case when x then 1 else 0 end) 别名 innerJoin=join 在某些数据库中,LEFT JOIN 称为 LEFT OUTER JOIN
左外连接写法2(Oracle写法) SELECT FROM 表名1,表名2 WHERE 表名1.字段=表名2.字段(+);
标签:sysdate,char,函数,sum,使用,yyyy,表名,where From: https://www.cnblogs.com/chen02/p/17823745.html