CEIL/de

From SQLZOO
< CEIL
Revision as of 17:09, 21 October 2012 by Peter (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Kompatibilität
CEIL(f)
DBMSOKAlternative
IngresJa
MySQLJa
OracleJa
PostgreSQLJa
SQL ServerNeinFLOOR(-f)

CEIL

CEIL(f) ermittelt die Ganzzahl (Integer), die gleich oder die nächstgrößere Zahl zu f ist. CEIL rundet immer auf.

 CEIL(2.7)  ->  3
 CEIL(-2.7) -> -2

In diesem Beispiel wird die Bevölkerungszahl (Population) in Millionen berechnet.

 
SELECT population/1000000 AS a,
       FLOOR(population/1000000) AS b
  FROM bbc
SELECT population/1000000 AS a,
       CEIL(population/1000000) AS b
  FROM bbc

Siehe auch

Sprache: English  • Deutsch
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense