1. Home
  2. Computing & Technology
  3. PHP / MySQL

Floor - MySQL Command

By Angela Bradley, About.com

Definition: Floor is used to round a number down to the last whole number. Any number with even the highest decimal is rounded down. This is the opposite of Ceiling which rounds everything up.
Also Known As: Round number down
Examples:
SELECT FLOOR(-3.14);
This would round down to -4
SELECT FLOOR(3.14);
This would round down to 3

Explore PHP / MySQL

More from About.com

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. MySQL Commands
  5. SQL Floor - MySQL Round Floor - MySQL Floor

©2008 About.com, a part of The New York Times Company.

All rights reserved.