Why FLOOR function is used?

 Posted by Abhisek on 2/25/2010 | Category: Sql Server Interview questions | Views: 3339

FLOOR function is used to roundup a non integer number to the next least integer.

SELECT FLOOR(355.34) FROM dual;

It will output 355. If we will pass a positive no. it will return only the integer part.

SELECT FLOOR(-355.34) FROM dual;

It will output -356. When we pass a negative value then it returns an integer less than the value passed.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Easwaran on: 8/31/2012 | Points: 10
While running above query I get 'Invalid object name 'dual'.' How to run the above query? Please do describe.

Login to post response