Concatenates two strings into one: : Function Return « Stored Procedure Function « Oracle PL / SQL






Concatenates two strings into one:

   
SQL>
SQL> 
SQL> CREATE OR REPLACE FUNCTION join_strings(string1 VARCHAR2, string2 VARCHAR2 ) RETURN VARCHAR2 IS
  2  BEGIN
  3    RETURN string1 ||' '|| string2||'.';
  4  END;
  5  /

Function created.

SQL>

   
    
    
  








Related examples in the same category

1.Return varchar2 value from function
2.Function return Integer
3.Return value from a function
4.Use function return value in select statement
5.Save the returning value from a procedure to a variable
6.RETURN statement.
7.Multiple RETURN Statements
8.Return a type
9.Return a varray from a function
10.Append result from generator function to a table
11.We use user function in DML statements
12.This script demonstrates using a record type as a function return value
13.Use function to check passwords
14.Use user-defined function to combine and format columns