1. Engineering
  2. Computer Science
  3. needs to be completed in sql developer 1 the following...

Question: needs to be completed in sql developer 1 the following...

Question details

Needs to be completed in SQL Developer

1). The following code will concatenate two strings str1 and str2

CREATE OR REPLACE PROCEDURE concatenate_strings as

str1 VARCHAR2(25) := 'begin';

str2 VARCHAR2(25) := 'end';

result VARCHAR2(50); BEGIN result := str1 || '_' || str2; dbms_output.put_line('The result is ' || result); dbms_output.put_line(SYSDATE);

END; /

SET SERVEROUTPUT ON;

EXECUTE concatenate_strings;

Modify this procedure to accept two string parameters.

Example of the output for EXECUTE concatenate_strings('big','dog');

The result is big_dog 26-Jan-16

2). Write a function f_concatenate_strings that will do the same as concatenate_strings procedure from #1, but can be called from a select statement.

Examples of output: SELECT f_concatenate_strings('big','dog') FROM DUAL;

Will return big_dog 27-JAN-16

Needs to be completed in SQL Developer

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution