sql server - Difference between fetchrow_array and fetchall_arrayref when working with stored procedures -
i have used both fetch result of stored procedure. have noticed fetchrow_array returns output of rows select inside stored procedure. whereas fetchall_arrayref returns status of stored procedure in last row, along selected rows in stored procedure.
why have difference , there way avoid getting status of stored procedure inside fetchall_arrayref?
my stored procedure
create procedure [dbo].[check_date_proc] @datestart datetime begin select check_date date_table data_date = @datestart end; go
and call
exec check_date_proc '20160920';
fetchrow_array returns
20160920
fetchall_arrayref returns
20160920 0
thanks
depending on database type working (and depending on perl dbd driver), getting multiple result sets.
there way processing multiple result sets (for ex., if have executed 2 statements have resulted in 2 result sets; , want both of them).
look here sample code.
since, in case, want ignore status of stored procedure, may feel convenient fetch results hashes (all rows in 1 pull or each 1 one one), , use names of columns data.
Comments
Post a Comment