How to use where in query?(s21)


Isn't it possible to extend a WHERE IN query over 2 columns - first column
is number and second is char) like

SELECT * FROM TABLE1 WHERE (ID, NAME) IN (SELECT ID_2, NAME_2 FROM TABLE2)



Ans1:

For example:

SELECT * FROM DEPT WHERE (DEPTNO,DNAME) IN (SELECT DEPTNO,DNAME FROM
TEMP_DEPT);

Will return all rows for DEPT that have a matching DEPTNO AND DNAME
row in the TEMP_DEPT table.
 
 
 
 

Hosted by www.Geocities.ws

1