The pipe character (‖) in Oracle is used to connect strings. It concatenates two strings into a single string, and the result is NULL if either is NULL. It can concatenate multiple strings with higher priority. Cannot concatenate numeric or date values.
The pipe character (‖) in Oracle
The pipe character (‖) in Oracle is an operator, It is used to concatenate two strings. The result of the concatenation is a single string concatenated from the two strings.
Syntax:
<code>string1 ‖ string2</code>
Operation:
The pipe character connects two strings together. If either string is NULL, the result is NULL. The concatenated string does not contain any spaces or other character delimiters.
Example:
<code>SELECT 'Hello' ‖ 'World' FROM dual;</code>
Result:
<code>Hello</code>
Append string:
Pipe character can be used Appends one string to the end of another string. For example, the following query appends "!" to the end of the "Hello" string:
<code>SELECT 'Hello' ‖ '!' FROM dual;</code>
Result:
<code>Hello!</code>
Concatenate multiple strings:
The pipe character can connect multiple strings. For example, the following query concatenates three strings together:
<code>SELECT 'Hello' ‖ ' ' ‖ 'World' ‖ '!' FROM dual;</code>
Result:
<code>Hello World!</code>
Note:
The above is the detailed content of What does ‖ mean in oracle?. For more information, please follow other related articles on the PHP Chinese website!