Home > Database > Oracle > body text

What is the function that intercepts from right to left in Oracle?

下次还敢
Release: 2024-05-03 00:09:15
Original
854 people have browsed it

Oracle's LTRIM function is used to truncate all whitespace characters from the right side of a string, including spaces, tabs, newlines, and carriage returns. It returns the trimmed string, or the original string if the string does not contain whitespace.

What is the function that intercepts from right to left in Oracle?

LTRIM function

The function used in Oracle to intercept a string from right to left is LTRIM.

Syntax:

<code>LTRIM(string)</code>
Copy after login

Parameters:

  • string: The string expression to be intercepted.

Function:

The LTRIM function intercepts all whitespace characters (spaces, tabs, line feeds and carriage returns) from the right side of the string, and returns the trimmed string. If the string does not contain any whitespace characters, the function returns the original string.

Example:

<code>SELECT LTRIM('  Hello World   ') FROM dual;

结果:
------
Hello World</code>
Copy after login

In this example, the LTRIM function truncates all spaces from the right side of the string and returns the trimmed string "Hello World".

Other notes:

  • The LTRIM function cannot intercept blank characters from the left side of the string. To intercept from the left side, you can use the RTRIM function.
  • The LTRIM function returns NULL for NULL values.
  • LTRIM function does not change the original string.

The above is the detailed content of What is the function that intercepts from right to left in Oracle?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!