0

What does (+) mean in SQL. I have an idea that it denotes outer join. But I came across a query which is as following:

select t1.a1, t2.a2
from t1,t2
where t1.b1 = t2.b2(+)
and t2.c3(+) = 'some_string'

I am more confused about the fourth line of code where the (+) equals some string. What does that denote?

Oracle: What does `(+)` do in a WHERE clause? -> I went through this question but it does not explain my main concern as to what exactly does t2.c3(+) = 'some_string' mean.

jarlh
  • 42,561
  • 8
  • 45
  • 63
  • 4
    Explicit join syntax was added to the ANSI standard SQL over *30* years ago. If the source you're learning from hasn't bothered to update since then, you may legitimately wonder about the quality of that source. – Damien_The_Unbeliever Apr 11 '23 at 12:50
  • Well I need to build a query off the old source, so need to translate what has been in place since years! – user18335335 Apr 11 '23 at 12:54
  • @TimothyG. That questions gives a fait bit of idea as to what (+) does, but not about my main concern of what (+) = 'some_string' means – user18335335 Apr 11 '23 at 12:55
  • 2
    If you remember that, even in the `ON` clauses of explicit joins, there is no requirement that every (or even any) of the conditions necessarily reference both tables. `t1 LEFT JOIN t2 ON t1.Id = t2.Id and t1.Foo = 'Bar'` is legitimate, as is the condition you're looking at that compares a column with a constant. – Damien_The_Unbeliever Apr 11 '23 at 13:01

0 Answers0