0

In the following query:

SELECT * from TABLE
WHERE Amount = +1;

Does the "+" sign just mean positive?

Is there a technical difference between using that query with or without the sign?

According to a similar question in a different thread,

unary plus operator will convert a string argument to a number. When applied to a constant string filled with digits, this could actually be beneficial as a way of encouraging the compiler to use an index on a numeric field.

That answer was given in a different context, but may answer my question too.

Community
  • 1
  • 1
  • 1
    In that context, yes - it's the [`+` unary operator](https://msdn.microsoft.com/en-us/library/ms174362.aspx) (documentation is for SQL Server but I;d suspect it would be the same for almost any other server software. – D Stanley Mar 11 '16 at 17:42
  • Which RDBMS you are using – Pரதீப் Mar 11 '16 at 17:47

0 Answers0