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 Comment S Shubrodeep Banerjee Follow 2 Improve S Shubrodeep Banerjee Follow 2 Improve Article Tags : SQL SQL-PL/SQL Explore SQL Tutorial 6 min read BasicsWhat is SQL? 6 min read SQL Data Types 3 min read SQL Operators 4 min read SQL Commands | DDL, DQL, DML, DCL and TCL Commands 4 min read SQL Database Operations 3 min read SQL CREATE TABLE 3 min read Queries & OperationsSQL SELECT Query 2 min read SQL INSERT INTO Statement 4 min read SQL UPDATE Statement 3 min read SQL DELETE Statement 3 min read SQL - WHERE Clause 3 min read SQL | Aliases 3 min read SQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join) 4 min read SQL CROSS JOIN 2 min read SQL | Date Functions 4 min read SQL | String functions 6 min read Data Constraints & Aggregate FunctionsSQL NOT NULL Constraint 2 min read SQL PRIMARY KEY Constraint 5 min read SQL Count() Function 7 min read SQL SUM() Function 5 min read SQL MAX() Function 4 min read AVG() Function in SQL 4 min read Advanced SQL TopicsSQL Subquery 4 min read Window Functions in SQL 6 min read SQL Stored Procedures 7 min read SQL Triggers 5 min read SQL Performance Tuning 6 min read SQL TRANSACTIONS 6 min read Database Design & SecurityIntroduction of ER Model 10 min read Introduction to Database Normalization 6 min read SQL Injection 11 min read SQL Data Encryption 5 min read SQL Backup 4 min read What is Object-Relational Mapping (ORM) in DBMS? 7 min read Like