ABS

Muzakkir Ipsal     12:36 PM  No comments


ABS

Returns the absolute, positive value of the given numeric expression.
Syntax
ABS ( numeric_expression )
Arguments
numeric_expression
Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.
Return Types
Returns the same type as numeric_expression.
Examples
This example shows the effect of the ABS function on three different numbers.
SELECT ABS(-1.0), ABS(0.0), ABS(1.0)
Here is the result set:
---- ---- ----
1.0  .0   1.0
The ABS function can produce an overflow error, for example:
SELECT ABS(convert(int, -2147483648))
Here is the error message:
Server: Msg 8115, Level 16, State 2
Arithmetic overflow error converting expression to type int.

Muzakkir Ipsal


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut odio. Nam sed est. Nam a risus et est iaculis adipiscing. Vestibulum ante ipsum faucibus luctus et ultrices.
View all posts by Naveed →

0 comments :

Tambahkan Komentar anda disini,Terimah kasih

Latest Stories

Blogroll New

Proudly Powered by Blogger.