TRUNCATE

 

The function TRUNCATE returns a numeric value that truncate to the specific places.

SQL Syntax:
 
   TRUNCATE( number, places )
Number:
 
  Any numeric expression.
Places:
 
  A integer expression that specified the precision. A positive value set the count of decimal places. A negative value set the count of decimal places left of the decimal point set are rounded.
Escape Syntax:
 
  {fn TRUNCATE( number )}
Return Type:
 
  FLOAT
     

Examples:

  • SELECT TRUNCATE(1.3456, 2), {fn truncate(-2012, -1)}

see also:
SQL Numeric Functions
ROUND
CEILING
FLOOR


100% pure Java DBMS
Mirror Site