Uh, because they're different queries.
You obviously have a record where flag = 1 and cod = M, which the second query will find but the first will not.
And I'm assuming you meant:- ChrisCode:SELECT A.COD, A.FLAG, B.AREA, B.NUM_ID FROM TAB A, TAB1 B WHERE A.ID=B.ID AND (FLAG=1 OR (FLAG=2 AND COD = 'N'))




Reply With Quote