- or download this
CREATE FUNCTION FUNC_JUST_RETURN_IT(i int)
RETURNS int
...
DETERMINISTIC
RETURN i
@
- or download this
-- execute directly
SELECT DB2INST1.FUNC_JUST_RETURN_IT(42)
FROM SYSIBM.SYSDUMMY1
- or download this
-- prepare, then execute later
SELECT DB2INST1.FUNC_JUST_RETURN_IT(?)
FROM SYSIBM.SYSDUMMY1
- or download this
use strict;
use warnings;
...
1;
__END__
- or download this
$ /usr/bin/perl -w call.function.pl
ok 1 - Expect 123456 returned
...
1..1
# Looks like your test died just after 1.
$