PLSQL : || Operator Last Updated : 19 Sep, 2019 Comments Improve Suggest changes 2 Likes Like Report The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. The || Operator in PLSQL is used to concatenate 2 or more strings together. The result of concatenating two character strings is another character string. The result has datatype CHAR and is limited to 2000 characters if both character strings are of datatype CHAR whereas if either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. The CONCAT character function can also be used as an alternative to the vertical bar operator in PLSQL for concatenation of strings. Syntax: string1 || string2 [ || string_n ] Parameters Used: string1 - It is used to specify the first string to concatenate. string2 - It is used to specify the second string to concatenate. string_n - It is used to specify the nth string to concatenate. Return Type: The || operator returns a string value. Supported Versions of Oracle/PLSQL: Oracle 12c Oracle 11g Oracle 10g Oracle 9i Oracle 8i Example-1: DECLARE Test_String string(10) := 'Hello '; Test_String2 string(10) := 'world!'; BEGIN dbms_output.put_line((Test_String || Test_String2)); END; Output: Hello world! Example-2: DECLARE Test_String string(10) := 'Geeks'; Test_String2 string(10) := 'For'; Test_String3 string(10) := 'Geeks'; BEGIN dbms_output.put_line(Test_String || Test_String2 || Test_String3); END; Output: GeeksForGeeks Create Quiz Comment S Shubrodeep Banerjee Follow 2 Improve S Shubrodeep Banerjee Follow 2 Improve Article Tags : SQL SQL-PL/SQL Explore BasicsWhat is SQL?6 min readSQL Data Types3 min readSQL Operators4 min readSQL Commands | DDL, DQL, DML, DCL and TCL Commands4 min readSQL Database Operations3 min readSQL CREATE TABLE3 min readQueries & OperationsSQL SELECT Query3 min readSQL INSERT INTO Statement4 min readSQL UPDATE Statement3 min readSQL DELETE Statement3 min readSQL - WHERE Clause2 min readAliases in SQL3 min readSQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join)4 min readSQL CROSS JOIN2 min readSQL | Date Functions4 min readSQL | String functions6 min readData Constraints & Aggregate FunctionsSQL NOT NULL Constraint2 min readSQL PRIMARY KEY Constraint5 min readSQL Count() Function7 min readSQL SUM() Function5 min readSQL MAX() Function4 min readAVG() Function in SQL4 min readAdvanced SQL TopicsSQL Subquery5 min readWindow Functions in SQL6 min readSQL Stored Procedures7 min readSQL Triggers5 min readSQL Performance Tuning6 min readSQL TRANSACTIONS6 min readDatabase Design & SecurityIntroduction of ER Model10 min readIntroduction to Database Normalization6 min readSQL Injection11 min readSQL Data Encryption5 min readSQL Backup4 min readWhat is Object-Relational Mapping (ORM) in DBMS?7 min read Like