I'm trying to understand the following query:
select count(distinct Name || '' || Surname) from PEOPLE;
What does the double bars mean? What does this query do?
In MySQL:select "aaaaa" || '' || "bbbbb";
+--------------------------+
| "aaaaa" || '' || "bbbbb" |
+--------------------------+
| 0 |
+--------------------------+
double bars are concatination: select 'hello' || ' ' || 'world' from dual; yields 'hello world' Follow this answer to receive notifications.
The concatenation operator is a binary operator, whose syntax is shown in the general diagram for an SQL Expression. You can use the concatenation operator ( || ) to concatenate two expressions that evaluate to character data types or to numeric data types.
In Oracle, the double pipe ( || ) stands for string concatenation.
The pound sign # is used to prefix temporary tables and procedures. A single instance ( # ) refers to a temporary object that lives/dies with the current session while a double instance ( ## ) is a global object.
double bars are concatination:
select 'hello' || ' ' || 'world' from dual;
yields
'hello world'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With