Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Strange Operator in SQL Statement
7 Oct 2004 06:00:44 -0700 Chris Gidman <cjgidman_at_yahoo.com>:
> I'm supporting an application having it's database in Oracle 8.1.7.4
> I found a view that has the following conditional in the WHERE clause:
>
> TABLE1.FIELD_FK =+ TABLE2.FIELD_PK
Since Oracle SQL is format free, your conditional is interpreted by
the Parser as
TABLE1.FIELD_FK = +TABLE2.FIELD_PK So the "+" acts as a unary arithmetic operation which is in fact identity.
2 = +2
Consider
TABLE1.FIELD_FK =- TABLE2.FIELD_PK which would also be syntactically correct, but yields all rows with
TABLE1.FIELD_FK = TABLE2.FIELD_PK = 0 Frank Piron Received on Thu Oct 07 2004 - 08:40:24 CDT