Here’s the deal:
Table A has columns A1 and A2
Table B has columns B1,B2,B3
Now i want to select data from columns A1 and B1 (without join), and the condition is:-
B3=’someword’ and A2=B2
If there is no need of printing B1, I would have written the query(without join) as:
select A1 from A where A2 in (select B2 from B where B3='someword');
But i need to print both A1 and B1, So is it possible to do that without using join and using ‘IN’???
When you say you need to restrict the ouput to where A2=B2
YOU ARE SPECIFYING a JOIN.
calling it something else does not change what it was… To paraphrase Willie,
“A Join by any other name is still a Join”
Seriously, a “Join” is not the name, nor the word nor even the syntax in a query used to apply it, it is the logical predicate or restriction, or filter, that is based on values from two different tables. If you need to restrict the output to where Table1.A2 equals Table2,B2, then you have a Join