This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,831 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

Add the CEILING alias for the CEIL function

iwis
iwis Member Posts: 12 Green Ribbon

I propose to add the CEILING alias for the CEIL function.

The CEILING function is in ANSI SQL Standard, PostgreSQL, MySQL, and SQL Server.

Scalar SQL functions differ quite significantly among RDBMS. This step will reduce this difference. Other changes in RDBMS proposed by me are here: https://github.com/iwis/SQL-notes/blob/master/Functions_proposed_changes.md

0 votes

Active · Last Updated

Comments

  • ShankarS-Oracle
    ShankarS-Oracle Member Posts: 224 Employee

    SQL Macros of type SCALAR make this possible in Oracle Database 21c onwards,i believe.

  • User_H3J7U
    User_H3J7U Member Posts: 1,062 Gold Trophy
    SQL> create operator ceiling
         binding (number)        return number        using ceil,
                 (binary_float)  return binary_float  using ceil,
                 (binary_double) return binary_double using ceil;
    
    SQL> select ceiling(123.456d) from dual;
    
    CEILING(123.456D)
    -----------------
    1,24E+002