Chapter 8 SQL Functions
373
SELECT "TRUNCATE"( 655.348, 2 )
This function is the same as TRUNCNUM. Using TRUNCNUM is
recommended as it does not cause keyword conflicts.
The quotation marks are required because of a keyword conflict with the
TRUNCATE TABLE statement. You can only use TRUNCATE without the
quotation marks if the QUOTED_IDENTIFIER option is set to OFF.
♦
SQL/92 Vendor extension.
♦
Sybase Not supported in Adaptive Server Enterprise.
"QUOTED_IDENTIFIER option" on page 207
"TRUNCNUM function" on page 373
TRUNCNUM function [Numeric]
Truncates a number at a specified number of places after the decimal point.
TRUNCNUM (
numeric-expression
,
integer-expression
)
numeric-expression The number to be truncated.
integer-expression A positive integer specifies the number of significant
digits to the right of the decimal point at which to round. A negative
expression specifies the number of significant digits to the left of the decimal
point at which to round.
The following statement returns the value 600
SELECT TRUNCNUM( 655, -2 )
The following statement: returns the value 655.340.
SELECT TRUNCNUM( 655.348, 2 )
This function is the same as TRUNCATE, but does not cause keyword
conflicts.
♦
SQL/92 Vendor extension.
♦
Sybase Not supported in Adaptive Server Enterprise.
"ROUND function" on page 362
"TRUNCATE function" on page 372
UCASE function [String]
Converts all characters in a string to upper case.
Usage
Standards and
compatibility
See also
Function
Syntax
Parameters
Examples
Usage
Standards and
compatibility
See also
Function