Following this logick the code should be compiled
CREATE DBPROC test(
IN p varchar) AS
BEGIN
select '44' from dual where :p='112';
END;
But it's copiled without error.
In Oracle 8.1.6 my example with varchar and substr compiles and works
without problems.
Schroeder, Alexander пишет:
You should explizitely specify the length, i.e.
CREATE DBPROC test(IN p VARCHAR(10)) AS
BEGIN
INSERT INTO table(field)
VALUES (substr(:p,3,1));
END;
otherwise 1 is assumed as length, which renders your substr function call
invalid.
See
http://dev.mysql.com/doc/maxdb/en/03/5087f083c411d