char和varchar2的一个案例
星期一, 十二月 17th, 2007今天在QQ一个朋友问了一个问题,
select t.*,t.rowid
from cux_erp_eam_outstock_vt
where xydw in
(select erp_dept_name
from base_department
where erp_dept_name in (’D-103005–焦化公司_炼焦作业区’))
做以上查询时,没有输出,但是分开执行时就有,一开始没有想到是设计的问题,只是想到base_department的erp_dept_name可能有空的。后来才找到问题,原来是两个表的相同字段类型不一致导致的。
