1 2 3 4 5 6 7 8 9 10 11
use DBI; my $dbh = DBI->connect( "DBI:mysql:dbname=$db", $user, $passwd, { PrintError => 0, RaiseError => 1, AutoCommit => 1, } ) or die DBI->errstr; $dbh->do( "CREATE TEMPORARY TABLE test_table AS SELECT * FROM Abteilung AS abt LEFT OUTER JOIN Mitarbeiter AS mit ON abt.AbtNr = mit.AbtNr" );
QuoteDBD::mysql::db do failed: Duplicate column name 'AbtNr' at ./perl.pl line 10
1 2
$dbh->do( "CREATE TEMPORARY TABLE test_table AS SELECT mit.Name, abt.Name FROM Abteilung AS abt LEFT OUTER JOIN Mitarbeiter AS mit ON abt.AbtNr = mit.AbtNr" );
QuoteDBD::mysql::db do failed: Duplicate column name 'Name' at ...