Name
Msql::getsequenceinfo
Synopsis
($step, $value) = $db->getsequenceinfo($table);
Msql::getsequenceinfo
takes the name of a table as
its argument. It returns the step and value of the sequence defined
on the table, if any. If there is no sequence defined on the given
table, an undefined value undef
is returned and an
error is placed in Msql::errmsg
.
Example
use Msql; my $db = Msql->connect; my ($step, $value) = $db->getsequenceinfo('mytable'); die "There is no sequence on mytable" if not $step; print "mystep has a sequence with a value of $value and a step of $step\n";
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.