0% found this document useful (0 votes)
5 views

SQL Server ABS() Function

The SQL Server ABS() function is used to return the absolute value of a numeric input. It is applicable in SQL Server starting from 2008 and is also supported in Azure SQL Database and Data Warehouses. The function's syntax is ABS(number), where 'number' is the required numeric value.

Uploaded by

soha.adel66
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

SQL Server ABS() Function

The SQL Server ABS() function is used to return the absolute value of a numeric input. It is applicable in SQL Server starting from 2008 and is also supported in Azure SQL Database and Data Warehouses. The function's syntax is ABS(number), where 'number' is the required numeric value.

Uploaded by

soha.adel66
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

1/22/25, 6:01 PM SQL Server ABS() Function

 Tutorials  Exercises  Certificates  Services  Search...  Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R

SQL Server ABS() Function


❮ Previous ❮ SQL Server Functions Next ❯

Example Get your own SQL Server

Return the absolute value of a number:

SELECT Abs(-243.5) AS AbsNum;

Try it Yourself »

Definition and Usage


The ABS() function returns the absolute value of a number.

https://www.w3schools.com/sql/func_sqlserver_abs.asp 1/7
1/22/25, 6:01 PM SQL Server ABS() Function

Syntax
 Tutorials  Exercises  Certificates  Services   Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R
ABS(number)

Parameter Values
Parameter Description

number Required. A numeric value

Technical Details
Works in: SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse,
Parallel Data Warehouse

❮ Previous ❮ SQL Server Functions Next ❯

Track your progress - it's free! Sign Up Log in

ADVERTISEMENT

https://www.w3schools.com/sql/func_sqlserver_abs.asp 2/7
1/22/25, 6:01 PM SQL Server ABS() Function

 Tutorials  Exercises  Certificates  Services   Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R

https://www.w3schools.com/sql/func_sqlserver_abs.asp 3/7
1/22/25, 6:01 PM SQL Server ABS() Function

 Tutorials  Exercises  Certificates  Services   Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R

COLOR PICKER



ADVERTISEMENT

ADVERTISEMENT
https://www.w3schools.com/sql/func_sqlserver_abs.asp 4/7
1/22/25, 6:01 PM SQL Server ABS() Function

 Tutorials  Exercises  Certificates  Services   Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R

 PLUS SPACES GET CERTIFIED FOR TEACHERS

FOR BUSINESS CONTACT US

Top Tutorials Top References


HTML Tutorial HTML Reference
CSS Tutorial CSS Reference
JavaScript Tutorial JavaScript Reference
How To Tutorial SQL Reference
SQL Tutorial Python Reference
Python Tutorial W3.CSS Reference
W3.CSS Tutorial Bootstrap Reference
Bootstrap Tutorial PHP Reference
PHP Tutorial HTML Colors
Java Tutorial Java Reference

https://www.w3schools.com/sql/func_sqlserver_abs.asp 5/7
1/22/25, 6:01 PM SQL Server ABS() Function
C++ Tutorial Angular Reference

 Tutorials  jQuery Tutorial


Exercises 
Top Examples
Certificates  jQuery Reference
Services 
Get Certified
 Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R
HTML Examples HTML Certificate
CSS Examples CSS Certificate
JavaScript Examples JavaScript Certificate
How To Examples Front End Certificate
SQL Examples SQL Certificate
Python Examples Python Certificate
W3.CSS Examples PHP Certificate
Bootstrap Examples jQuery Certificate
PHP Examples Java Certificate
Java Examples C++ Certificate
XML Examples C# Certificate
jQuery Examples XML Certificate

    

FORUM ABOUT ACADEMY


W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy
policy.

https://www.w3schools.com/sql/func_sqlserver_abs.asp 6/7
1/22/25, 6:01 PM SQL Server ABS() Function
Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

 Tutorials  Exercises  Certificates  Services   Sign Up Log in

HTML
 CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP R

https://www.w3schools.com/sql/func_sqlserver_abs.asp 7/7

You might also like