use test;
DELIMITER go
CREATE or replace procedure f3(p1 IN number, p2 IN OUT VARCHAR2(80), p3 in out number)
AS
x varchar(0);
BEGIN
  p3:=p1*cast(5.56957 as decimal(64,24))/cast(10.51248  as decimal(64,24));
  -- p2:=cast(p3 as varchar2(80));
  -- p2:=format(p3,24);
  p2:=cast(p3 as char);
  return ;
END
go
CREATE or replace procedure f4(p1 IN decimal(64,24), p2 IN OUT VARCHAR2(80), p3 in out decimal(64,24))
AS
BEGIN
  p3:=p1*cast(5.56957 as decimal(64,24))/cast(10.51248  as decimal(64,24));
  p2:=cast(p3 as char);
  return ;
END
go
DELIMITER ;
call f3(5646578795568767.245697,@wp2,@wp3);
select 'number() '||@wp2||'    '||@wp3;
call f3(56465787955687.245697,@wp2,@wp3);
select 'number() '||@wp2||'    '||@wp3;
call f4(5646578795568767.245697,@wp2,@wp3);
select 'decimal(64,24) '||@wp2||'    '||@wp3;
call f4(56465787955687.245697,@wp2,@wp3);
select 'decimal(64,24) '||@wp2||'    '||@wp3;

