前言
简单描述一下场景,在Oracle的一个存储过程中遍历一个Cursor,然后在循环中需要用到in查询语句,而in里面的条件正是游标当前行的一个的字段值类型为字符串,形如:
而存储过程中又自然而然的写了这样的语句(重点第四行):
select count(*) into current_hjnum from t_studentinfo
where kslbdm_ = 1
and hjstreet_ = everyrow.streetcode_
and hjdoornum_ in (everyrow.num_)
and areacode_ = everyrow.householdareaid_
and bmflag_>=5