Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Math FunctionsRSS Feeds

FLOOR Function

Posted By: Sarita Patel     Category: SQL Server     Views: 3861

This article explains FLOOR function of sql server with examples.

FLOOR function is used to get largest integer number less than or equal to the numeric expression.


Syntax of FLOOR Function :

FLOOR (numeric_expression)

numeric_expression is a number or approximate number data type except bit.

Return type of FLOOR function is same as specified numeric expression.



Examples of FLOOR Function :

Example 1 : Use of FLOOR function in select clause

SELECT  FLOOR(560.550)

Output
560  

Above example returns largest integer number less than the specified positive number.



Example 2 : Use of FLOOR function in select clause


SELECT  FLOOR(-560.550)

Output
-561

Above example returns largest integer number less than the specified negative number.

  
Share: 

 
 
 

Didn't find what you were looking for? Find more on FLOOR Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of FLOOR Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!