20190917


  • hive没有SQL Server 的isnull和MySQLd的ifnull函数,可以用if()函数替代
  • if(条件,值1,值2) 条件为真:值1,否则值2(相当于c++里的三目运算?:
	select if(column2 is null, 0, cslt.self_cancel_amount) as nwe_column from table_name;
	select sum(column1 - if(column2 is null, 0, cslt.self_cancel_amount)) as nwe_column from table_name;

参考

hive if函数

相关文章:

  • 2022-12-23
  • 2021-10-06
  • 2022-02-07
  • 2021-09-18
  • 2023-03-30
猜你喜欢
  • 2021-12-06
  • 2021-08-18
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案