Follow us: Connect on YouTube Connect on YouTube Connect on YouTube


Friday, 1 April 2016


This will produce a whole number that is less than or equal to the specified value.

     Syntax: floor (value)   

          SQL> select floor(5), floor(5.1), floor(-5), floor( -5.1), floor(0), floor(null) from dual;

   FLOOR(5) FLOOR(5.1)  FLOOR(-5) FLOOR(-5.1)   FLOOR(0) FLOOR(NULL)
-----------  -------------   ------------  --------------    -----------  ----------------

         5               5                 -5                 -6                   0

You May Like                                             
                            SQL Abs
                            SQL Sign
                            SQL Sqrt
                            SQL Mod
                            SQL NVL
                            SQL NVL2
                            SQL Power
                            SQL Exp
                            SQL Ln
                            SQL Log
                            SQL CEIL                           
                            SQL Round
                            SQL Trunc
                            SQL Bitand
                            SQL Greatest
                            SQL Least
                            SQL Coalesce
Share this article :


  1. Halo,

    Gratitude for putting up this prolific article! You truly make everything a cake walk. Genuinely good stuff, saving time and energy.

    I have an MS SQL Server 2012 database on a remote server, and since moving to a new laptop, I have been unable to connect to the database using SQL Server Management Studio 2012. I'm pretty sure this has something to do with my local machine, as I have never had a problem before. I installed SQL Server 2012 and SQL Management Studio 2012, and both seem to be working ok. I can connect to the local SQL database using management Studio, however when I try to connect to my remote database, I'm getting the following error:
    Cannot connect to\MSSQLSERVER2012
    A network-related or instance-specific error.... error: 26 - Error Locating Server/Instance Specified).
    I have checked that SQL server is running locally, and allowed ports 1433 and 1434 through my firewall. I've checked and double-checked the servername and login details. The online application which connects to the database ( is not experiencing any problems.

    Once again thanks for your tutorial.