DB2 column functions and scalar functions

Source: Internet
Author: User

DB2 column functions are one of our most commonly used functions. They calculate a group of values in the column to obtain a single result value. Let's take a look at the DB2 column functions.

DB2 column Functions

DB2 column functions perform operations on a group of values in a column to obtain a single result value. The following is an example of some column functions.

AVG
Returns the sum of the values in a group divided by the number of values in the group.

COUNT
Returns the number of rows or values in a group.

MAX
Returns the maximum value of a group of values.

MIN
Returns the minimum value of a set of values.

DB2 scalar functions

A scalar function performs an operation on the value to return another value.
The following are some examples of scalar functions provided by the DB2 Universal Database.

ABS
Absolute Value of the returned number

HEX
Hexadecimal representation of the returned value

LENGTH
Returns the number of bytes in the independent variable. returns the number of double-byte characters for a string .)

YEAR
Extract the year of the datetime Value

Four file formats for DB2 data movement

DB2 mount command performance factors

Deep analysis DB2 modification table

DB2 rename a table and view table information

DB2 index syntax

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.