Write a PL/SQL program to Remove a letter form a word - Computer Programming

Latest

C C++ Java Python Perl Programs Examples with Output -useful for Schools & College Students

Thursday, October 5, 2017

Write a PL/SQL program to Remove a letter form a word

Remove a letter form a word Using Procedural Language

Program:

DECLARE
PROCEDURE rem_o(n VARCHAR2)
IS
name1 VARCHAR2(5);
name2 VARCHAR2(5);
x NUMBER;
BEGIN
x := INSTR(n,'o',1,1);
name1 := SUBSTR(n,1,(x-1));
name2 := SUBSTR(n,(x+1),LENGTH(n));
dbms_output.put_line( name1 || name2);
END;

BEGIN
rem_o('snoopy');

END;

No comments:

Post a Comment