Suppose I have two tables which are joined with each other,
I need to select data from them without using Join syntax. Is that practically possible?
If yes, Then How?
Thanks in Advance
vJ
Yes, it is. And it is perfectly valid.
SELECT tblOne.value1,tblTwo.value2 FROM tblOne,tblTwo WHERE tblOne.c1=tblTwo.c2
Use Unions. Its syntax like-
SELECT a,b,c FROM table1
UNION
SELECT d,e,f FROM table2
UNION ALL will return all rows from both tables, if you only want DISTINCT rows then you will want to use UNION
Use two separate queries. Each query references one table.
The tables in the database aren't really "joined". There may be foreign key constraints defined, or the rows may be related by values stored in each table... but they aren't "joined".
A JOIN operation is the mechanism the relational database engine uses to match rows (using an algorithm, either nested loops, merge, or hash.)
The JOIN keyword is the ANSI standard for specifying that the database perform a join operation.
The old-school comma operator is an alternative to the JOIN keyword, but it's still a join operation.