What is Ceiling Function of XQuery
In this article we will discuss about what is ceiling function of XQuery.
XQuery supports several built-in-functions one of which is Ceiling Function. This function works on numeric data type in XQuery. This function takes the argument as any numeric data type. Whenever it is used it rounds up the result to the next highest integer value and also the type of the result depends on the numeric type of the argument passed to it.
If the given argument is empty sequence then it will also return empty sequence.
The syntax of using the ceiling function is as follows.
fn:ceiling ( $arg as numeric?) as numeric
Here the $arg is the name of the argument passed to it and as numeric? means it is declared as any numeric data type of XQuery and outside the parenthesis return type has been declared specifying that this function will return the numeric type value.
The Example of this function is as follows.
|XQuery Ceiling Method Example
|ceiling( ( ) )
|| ( )
In the above output we have seen that the ceiling function have rounded up to the next integer.
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here