Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> a easy SQL question?

a easy SQL question?

From: <yliu_at_creighton.edu>
Date: 2000/02/17
Message-ID: <Pine.HPP.3.95.1000217144949.23009B-100000@penguin.creighton.edu>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US