Tuesday, June 19, 2018

Create a function to remove the right character position of string - DBMS (Function)

create or replace function display(ch in varchar2,no in number) 
return varchar2 is ans varchar2(50);
a number(5);
begin
select length(ch) into a from dual;
ans:=SUBSTR(ch,a-no+1,no);
return ans;
end;

No comments:

Post a Comment