Common functions of Oralce SQL

Source: Internet
Author: User

Character Functions

This function generally receives characters as parameters and can return characters or numbers.

The following two functions are commonly used:

1. CONCAT Function

It is mainly used for string connection. The specific syntax is as follows:

CONCAT (c1, c2)

Receive two parameters and connect the second parameter to the end of the first parameter. If the second parameter is NULL,

The function returns the first parameter. If the first parameter is NULL, the second parameter is returned,

If all values are NULL, the function returns NULL.

An example of adding a metaunit for a product price is as follows:

2. NVL Function

This function is mainly used for function replacement.

NVL (e1, e2)

Receives two parameters. If the first parameter is not NULL, the function returns the first parameter,

If the first parameter is NULL, the function returns the second parameter.

An example is as follows:

Query the related information of the product table. The "no detailed description" is displayed for the default settings of products that are not described in detail"

NULL can be replaced by no detailed description.

There are still many common character functions. I hope you can comment on them based on me.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page
[Content navigation]
Page 6: character Functions Page 1: Numeric Functions
Page 1: Date Functions Page 1: conversion functions
Page 1: Aggregate functions

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.