You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select * from employee where area like :area
此处如果:area参数的默认值为空的时候,将会数据预览失败,无法读取字段. 如果参数传入的值为 上海% 的时候,过滤条件无效
后来此处改为 where area like concat(:area,'%') 之后, area参数默认值%
参数传入值为 上海 时,过滤条件有效
参数传入值为 上海% 时,过滤条件无效
select * from employee where area like :area
此处如果:area参数的默认值为空的时候,将会数据预览失败,无法读取字段. 如果参数传入的值为 上海% 的时候,过滤条件无效
后来此处改为 where area like concat(:area,'%') 之后, area参数默认值%
参数传入值为 上海 时,过滤条件有效
参数传入值为 上海% 时,过滤条件无效
具体的业务需求为 当area为空的时候,显示所有数据,当area为上海的时候,显示所有上海区域的数据.
The text was updated successfully, but these errors were encountered: