According to DBI, you can recover the statement passed to your prepare statement either through the statement handle or the database handle, by invoking the statement attribute. In your code, this could be done with:
my $sth = $dbh->prepare(<<EOQ); select tbl.column1, tbl2.column2 from tbl1, tbl2 where condition = ? EOQ print $sth->{statement};
In reply to Re: DBI - Get prepared/populated sql statement
by kennethk
in thread DBI - Get prepared/populated sql statement
by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |