Find the names of all departments located in either BOSTON or DALLAS, not in both cities.
I have code like this
SELECT D.DNAME
FROM DEPARTMENT D
INNER JOIN DEPTLOC L ON L.DNAME = D.DNAME
WHERE L.CITY='BOSTON'
OR L.CITY='DALLAS' ;
But it will show the department located in BOSTON OR DALLAS. But I just want to either enter what I have to put in order to get the result.
Example: in my DEPTLOC table
//DEPTLOC
DNAME CITY
----------------
ACCOUNTING BOSTON
ACCOUNTING DALLAS
SALES DALLAS
TRANSPORT BOSTON
TRANSPORT DALLAS
So, in my department I should get an output like
DNAME
----------
SALES
source
share