SQL Server/T-SQL Tutorial/Math Functions/ABS
Версия от 16:46, 26 мая 2010; (обсуждение)
ABS function returns the absolute value of any number passed to it.
<source lang="sql">
4> 5> SELECT SQRT(2.0*ABS(2000.0)*ABS(-8.0)/ABS(0.20)) 6> GO
400
(1 rows affected)</source>
select ABS(-1.25)
<source lang="sql">
4> select ABS(-1.25) 5> GO
1.25
(1 rows affected)</source>