首页 > 代码库 > sql中where以后and和or的用法

sql中where以后and和or的用法

SELECT *
FROM NOTICE
WHERE 1 = 1
AND (Z_STATUS = 1 AND RELEASE_DEPT_ID = ‘-1‘ AND IS_ISSUE = 1 OR
INSTR(RELEASE_DEPT_ID, ‘109‘) > 0)
AND ID = ‘9F754701039E4903811E57589B19B18A‘

ORDER BY ISSUE_DATE DESC

sql中where以后and和or的用法