I have a DEPTLOC table like this:
//DEPTLOC
DNAME CITY
------------------------
RESEARCH BOSTON
IT LONDON
SCIENCE BOSTON
SEARCHING NEWYORK
I used the following query:
SELECT CITY FROM DNAME WHERE DNAME='RESEARCH'
INTERSECT
SELECT CITY FROM DNAME WHERE DNAME='SCIENCE'
So this returns a result, for example:
CITY
BOSTON
But how can I change the code so that if any result is found, it will display NO, otherwise it will display YES
The result should be something like this:
RESULT
YES
or
RESULT
NO
source
share