Home >Database >Mysql Tutorial >oracle统计无记录时写默认值

oracle统计无记录时写默认值

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:03:041393browse

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 oracle统计无记录时写默认值 select nvl(max(t1.packagesize),0) from ( select decode(count(t.per_bus_code),0,'1') per_bus_code,decode(count(t.buss_code),0,'1') buss_code,decode(count(t.pe

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

    oracle统计无记录时写默认值

    select  nvl(max(t1.packagesize),0)

    from (

    select decode(count(t.per_bus_code),0,'1') per_bus_code,decode(count(t.buss_code),0,'1') buss_code,decode(count(t.per_code),0,'1') per_code

    from t_tybook_back_pers_business t

    where t.per_code = 'TY-00000106'

    and t.end_date > sysdate

    and t.start_date

    left join t_tybook_before_business t1 on t.buss_code = t1.code

    group by t.per_code;

oracle统计无记录时写默认值

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn