## Produce an update statement for a given table. use DBI; $table = shift; $sth = DBI->connect('dbi:Oracle:sid', 'user', 'pass') ->column_info(undef, undef, $table, "%"); $sth->execute(); push @columns, $_->{COLUMN_NAME} while $_ = $sth->fetchrow_hashref; print "update $table set (", join(', ', @cols), ") = (", join(', ', ('?') x @cols), ") where " . (shift) . " = ?;\n";