Concatenation of strings in PL/SQL Last Updated : 03 Jul, 2018 Comments Improve Suggest changes Like Article Like Report Prerequisite - PL/SQL Introduction In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations. Given two strings and the task is to concatenate them and store it in another string. Examples: Input: str1 = ' RAMESH', str2 = 'SURESH' Output: RAMESH SURESH Input: str1 = ' Ramesh is a good boy', str3 = 'and', str2 = 'Suresh is a brilliant student'. Output: Ramesh is a good boy and Suresh is a brilliant student Approach is to use the concatenation operator i.e. || . Below is the required implementation: SQL DECLARE --Here variables are str, str1, str2 and v str VARCHAR2(40) := 'Ramesh is a good boy'; str1 VARCHAR2(40) := 'Suresh is a brilliant student'; str2 VARCHAR2(40) := 'and'; v VARCHAR2(100); BEGIN v := str ||' ' || str2 ||' ' ||str1; dbms_output.Put_line(v); END; -- Program End Output: Ramesh is a good boy and Suresh is a brilliant student Comment More infoAdvertise with us Next Article Concatenation of strings in PL/SQL S Shashank12 Follow Improve Article Tags : Misc SQL SQL-PL/SQL Practice Tags : Misc Similar Reads Count no. of characters and words in a string in PL/SQL Prerequisite - PL/SQL introduction In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations. Given a string and the task is to count the number of c 2 min read SQL | Concatenation Operator The SQL concatenation operator (||) is a powerful feature that allows us to merge two or more strings into a single output. It is widely used to link columns, character strings, and literals in SQL queries. This operator makes it easier to format and present data in a user-friendly way, combining mu 3 min read No. of vowels and consonants in a given string in PL/SQL Prerequisite - PL/SQL introduction In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations. Given a string and the task is to find the number of vo 2 min read Using LENGTH() Function in SQL Understanding the length of strings within a database is a fundamental aspect of effective data management and analysis. In the world of SQL, the LENGTH() function provides an essential tool for measuring the number of characters in a string, which can be invaluable for various tasks such as data va 4 min read Inbuilt Concat Function in PLSQL Prerequisite : PLSQL BASICS Introduction : PLSQL stands for "Procedural Language extensions to SQL" and is used to transform, update and query data in a database. It is grouped into blocks that contain the declaration and statements. And it is integrated with the oracle database (since version 7). A 3 min read Like