In an Oracle-compatible tenant, || is used as a string concatenation operator.
Examples
Create a table named
tif_ny.obclient> CREATE TABLE tif_ny ( id NUMBER, f_name VARCHAR2(20), l_name VARCHAR2(20), c_date date, PRIMARY KEY (id) ); Query OK, 0 rows affectedInsert data into the
tif_nytable.obclient> INSERT INTO tif_ny VALUES(401,'Zhang','San',date'1970-8-11'), (402,'Li','Si',date'1971-5-11'),(403,'Wang','Wu',date'1972-7-11'); Query OK, 3 rows affected Records: 3 Duplicates: 0 Warnings: 0Query data in the
tif_nytable.obclient> SELECT * FROM tif_ny; +-----+--------+--------+-----------+ | ID | F_NAME | L_NAME | C_DATE | +-----+--------+--------+-----------+ | 401 | Zhang | San | 11-AUG-70 | | 402 | Li | Si | 11-MAY-71 | | 403 | Wang | Wu | 11-JUL-72 | +-----+--------+--------+-----------+ 3 rows in setUse
||as a string concatenation operator to concatenate thef_nameandl_namecolumns in thetif_nytable into thenamecolumn.obclient> SELECT f_name || ' ' || l_name name FROM tif_ny; +-----------+ | NAME | +-----------+ | Zhang San | | Li Si | | Wang Wu | +-----------+ 3 rows in set