Concatenation of strings 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 two strings and the task is to concatenate them and store it in another string.
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:
Ramesh is a good boy and Suresh is a brilliant student
Attention reader! Don’t stop learning now. Learn SQL for interviews using SQL Course by GeeksforGeeks.