SELECT u.login_id, (select 1 from dual where exists(select 1 from mdp_user_login_info muli where muli.BIZ_SYS = ‘admin‘ and u.login_id=muli.user_id and muli.LOGIN_TIME < now() and now() < muli.LOGOUT_TIME ) ) as attribute4 FROM MDP_SEC_USER u WHERE u.DELETION_FLAG = ‘F‘ AND (u.TYPE = ‘b‘ OR u.TYPE = ‘p‘) and u.login_id like ‘%engwp%‘ ORDER BY u.ID limit 0,5;
查询某记录是否存在,存在返回 1
时间: 2024-10-13 15:02:42