3

What does the @ symbol signify in this sql expression?

update some_table set some_number=(@some_number+1) where some_id=1;

It seems to return the same result as:

update some_table set some_number=some_number+1 where some_id=1;
1
  • 1
    Please tag your post. It is unclear which SQL language you are using. Aug 15, 2018 at 16:21

1 Answer 1

3

@ is the "absolute value" operator.

SELECT @ -1;
 ?column?
----------
        1
(1 row)

It returns the same value for positive numbers.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.