I'm looking at a script writen bu someone who isn't around anymore and I have a found something in it I haven't come across before.
In the sample script below the subselect c is joined in a way I've never used.
I'm looking for some advice/opinion as to what sort of join it defaults to when it's done like this and why would you do it like this rather than a more "traditional" inner/left/right join type?
I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
In the sample script below the subselect c is joined in a way I've never used.
I'm looking for some advice/opinion as to what sort of join it defaults to when it's done like this and why would you do it like this rather than a more "traditional" inner/left/right join type?
Code:
SELECT *
FROM TABLEA A
INNER JOIN
TABLEB B
ON
A.FIELD1 = B.FIELD1,
(SELECT FIELD3, MAX(FI4LD4) FROM TABLE C) C
WHERE B.FIELD3 = C.FIELD3
I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)