博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年1月15日

摘要: 处理分母为零的SQL函数 :select 77/nullif(2,0) 应用coalesce和nullif的组合来减轻写sql的务工量 :select coalesce(nullif(type_a,997),0) as type_a from tbl***function(/*常用函数*/)*** ----统计函数---- AVG --求平均值 COUNT --统计数目 MAX --求最大值 MI... 阅读全文

posted @ 2010-01-15 16:05 AndyZhou 阅读(3380) 评论(0) 推荐(0) 编辑