> > is it possible to do it in one statment for each database
> > Delete FROM table1,table2,table3,table4 WHERE userid = "userid";
> > Any help is appreciated
>
> Your question has nothing to do with DBI. This is a question about
> SQL in general and the particualar SQL implementation you are using.
>
Well, the question is *marginally* related to DBI. You could do something
like this:
my @tables = qw(table1 table2 table3 table4);
my $sql = q!DELETE FROM "%s" WHERE "userid" = ?!;
my $dbh = ...
foreach my $table (@tables) {
my $sth = $dbh->prepare(sprintf($sql,$table)) or die;
$sth->execute($userid) or die;
}
$dbh->commit;
(Very sketchy pseudo-code.)