Pourriez-vous m'apprendre comment créer une boucle? & renommer la table MySQL en Perl. Merci.Comment faire pour boucler et renommer la table MySQL en Perl
mon extrait de code attaché
use strict;
use warnings;
use DBI;
my $dbh = DBI->connect(
'DBI:mysql:database=dbdev;host=localhost',
'dbdev',
'dbdevpw',
{ RaiseError => 1, AutoCommit => 1 },
);
my $sql = RENAME TABLE old_table TO new_table;
my $sth = $dbh->prepare($sql);
while (<DATA>){
chomp;
// How to implement the Rename all the old tables with the while loop.
$sth->execute();
}
Quel est le downvote pour cette question? –