my $id = $dbh->quote(10); $sth = $dbh->prepare("SELECT PRODUCT_ID FROM schema.products\@dblink_to_testdb where (product_id=$id)"); $sth->execute($id);