Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Using numeric values

A numeric value can be used in:

  • Assignments:
    (see section "Assignment rules")

  • Aggregate functions:
    A numeric value can be used in the aggregate functions AVG(), COUNT(), MIN(), MAX() and SUM().

  • Time functions:
    A numeric value can be used in the time function DATE_OF_JULIAN_DAY()

  • Expressions:
    A numeric value can be used in calculations with the operators +, -, * and /. All the values in the expression must be numeric.

  • Predicates:
    A numeric value can be used in comparisons with another value or with a derived column, in range queries and in element queries.
    All the values in the expression must be numeric. The rules governing comparisons are described in the section "Comparison of two rows".


Functions, expressions and predicates are described in detail in the chapter "Compound language constructs".


Examples


The following examples refer to the SERVICE table.


Enter an order number as follows:

INSERT INTO service (service_num, order_num, service_total, service_price)

VALUES (5000, 250, 1, NULL)


Update the order quantity:

UPDATE service SET service_total=34.75 WHERE service_num=5000

The specified value is converted into an integer.


UPDATE service SET service_total='lots' WHERE service_num=5000

This is an error: The specified value is not numeric.