Home > Database > Oracle > body text

What function does Oracle use to contain a certain character?

下次还敢
Release: 2024-05-07 16:33:13
Original
1163 people have browsed it

Functions that contain specific characters in Oracle

In Oracle database, you can use the INSTR() function to check whether a string contains specific characters.

Syntax:

<code>INSTR(string, substring)</code>
Copy after login

Where:

  • string: The string to be searched
  • substring: The character or string to be found

Example:

Find whether the string "Hello World" contains letters "o":

<code>SELECT INSTR('Hello World', 'o') FROM dual;</code>
Copy after login

Result:

<code>4</code>
Copy after login

This means that the character "o" is at position 4 in the string "Hello World".

Return result:

  • If substring is found in string, then substring# is returned The first occurrence of ## in string.
  • Returns 0 if
  • substring is not found in string.

Note:

    String comparison is case-sensitive.
  • If
  • substring is the empty string, the INSTR() function returns 1.

The above is the detailed content of What function does Oracle use to contain a certain character?. 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!