1、
SELECT * FROM cxzjg_across_dept_apply WHERE user_dept_id='1005' AND ( status ='2'OR STATuS= '3' ) ;
或者 :
SELECT * FROM cxzjg_across_dept_apply WHERE ( status ='2'OR STATuS= '3') AND user_dept_id='1005' ;
效果如下:
2、SELECT * FROM cxzjg_across_dept_apply WHERE user_dept_id='1005' AND status ='2'OR STATuS= '3' ;
效果如下:
3、SELECT * FROM cxzjg_across_dept_apply WHERE status ='2'OR STATuS= '3' AND user_dept_id='1005' ;
效果如下:
图片粘贴不上,显示全部符合or的记录。