SELECT
ts.*
FROM
t_scenic ts
WHERE
NAME NOT IN (
SELECT
scenic
FROM
t_order_travelplan_jp
WHERE
orderId = @orderid
AND scenic != @scenicname
)
and cityId = @cityid and region = @region
上边是sql语句,下边是controller
Sql sql = Sqls.create(sqlString);
sql.setParam("orderid", orderid);
sql.setParam("cityid", plan.getCityId());
sql.setParam("scenicname", plan.getScenic());
其中region参数有两种情况,region为空时需要是 region is null,但用sql.setParam("region ", region )是 region = null,怎么写最终sql才是region is null?