I have a table
A
name num
------------
A 1
B 0
C 3
B
num marks
---------------
1 90
3 40
Query: ??
Result:
name marks
--------------
A 90
C 40
B 90
B 40
So number “0” in table A corresponds to all num column values. Is there a way this query can be written
I know to get this
name marks
--------------
A 90
C 40
we can do this
select A.name, B.marks from A,B where A.num = B.num;
Edit: In this case 0 maps to num values 1 and 3
How about: