oralce中,某一条记录中怎么得到这条记录中字段值为空的总数呢?(不为空的总数也可)
比如:id a1 a2 a3 a4 ... an
id=1的记录中a1,a2 a3...ak不为空,剩下的ak到an为空,我要怎么得到为空或不为空的字段数呢?(字段很多,一个一个判断不是很方便)。
小弟拜谢
比如:id a1 a2 a3 a4 ... an
id=1的记录中a1,a2 a3...ak不为空,剩下的ak到an为空,我要怎么得到为空或不为空的字段数呢?(字段很多,一个一个判断不是很方便)。
小弟拜谢
select length(translate(re, '$'||re, '$')) len from t
select count(* ),id from usermodule group by id;
http://topic.csdn.net/u/20120726/11/c2edd2fe-10ad-44dc-b51b-0beeaedeafe5.html