Saturday, 13 April 2013

SQL Functions:ABS

ABS: Returns absolute value for argument. The data type of the output remains the same.

SELECT ABS (input_value)  FROM  Table;

This query will return the absolute value of input_value

SELECT ABS(-250 ) FROM  Table;

Output: 250

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

ShareThis