where ipm.delect_type is null and exists (select 1 from plan_order_item oi where oi.plan_id =ipm.plan_id and exists (select 1 from sm.ass_person_privileges pp where pp.room_id=oi.facility_id and pp.user_id=#{userId})) SQL中where条件这样写可以不
时间: 2023-05-13 10:06:15 浏览: 181
tree-log.rar_The Just_log
这是一个SQL查询语句,意思是查询ipm表中delect_type为空的记录,并且存在一个子查询,子查询中查询plan_order_item表中plan_id等于ipm表中plan_id的记录,并且存在另一个子查询,子查询中查询sm.ass_person_privileges表中room_id等于plan_order_item表中facility_id并且user_id等于某个值的记录。具体查询的目的和结果需要根据具体情况来确定。
阅读全文