Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Wednesday 3 September 2014

ABS Function in Greenplum


ABS is short name of ABSOLUTE. When we use it, it shows the absolute value of the number.

When output comes in a negetive integer, it converts it in possitive integer by multiplying it by -1.

Let's have an example:-

SELECT ABS(70);

--> 70

SELECT ABS(70.70);

--> 70.7

SELECT ABS(-70);

--> 70

SELECT ABS(-70.70);

--> 70.7

SELECT ABS(-70*10);

--> 700

SELECT ABS(70*10);

--> 700


Read Also:-  ABS function in Teradata

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.