卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

sql存儲(chǔ)過程實(shí)例詳解 oracle數(shù)據(jù)庫條件判斷的查詢語句怎么寫?

oracle數(shù)據(jù)庫條件判斷的查詢語句怎么寫?建表,測(cè)試數(shù)據(jù):create table test(收款標(biāo)志 int)insert into test values (1)insert into test

oracle數(shù)據(jù)庫條件判斷的查詢語句怎么寫?

建表,測(cè)試數(shù)據(jù):

create table test(收款標(biāo)志 int)insert into test values (1)insert into test values (1)insert into test values (1)commit

執(zhí)行:

select case when a.cnt = b.cnt then "未收款" when a.cnt = d.cnt then "已收款" when c.cnt <> 0 then "部分收款" end 收款狀態(tài) from (select count(*) cnt from test) a, (select count(*) cnt from test where 收款標(biāo)志 = 1) b, (select count(*) cnt from test where 收款標(biāo)志 = 2) c, (select count(*) cnt from test where 收款標(biāo)志 = 3) d

結(jié)果:

然后你自己換點(diǎn)其他數(shù)據(jù)測(cè)試一下吧,思路就這么個(gè)思路了。