Question

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;
Was it helpful?

Solution

@ is the "absolute value" operator.

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

It returns the same value for positive numbers.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top