Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> a easy SQL question?
Hi All,
I have a table called dept. Two of the fields in dept table is emp_name and deptno. I want to select every emp_name from dept table except for two deptno (R% and X%). I am confused on which operator to use: OR or AND. My SQL statement is like:
select emp_name, deptno from dept where ... and (deptno not like X% or deptno not like R%) and ...;
However, I don't know if I should use AND in the above where clause? Maybe somebody has some suggestions that will clear my confusion.
Thanks in advance for helping.
Yong
yliu_at_creighton.edu
Received on Thu Feb 17 2000 - 00:00:00 CST
![]() |
![]() |