Hello !!!
For a project in the work I need to create a few tables as backups so I need to create them from perl, in mysql I can go and do this :
DROP TABLE IF EXISTS newtable;
CREATE TABLE newtable
SELECT T.time, T.name, T.last, P.company, P.wife
FROM T
JOIN P ON T.wife = P.wife and T.company = P.company;
but when I try to do it in perl did not work
Why?
On perl I try to put every thing like this
$sql="DROP TABLE IF EXISTS newtable;
CREATE TABLE newtable
SELECT T.time, T.name, T.last, P.company, P.wife
FROM T
JOIN P ON T.wife = P.wife and T.company = P.company";
$sth = $dbh->prepare($sql);
$sth->execute ();
$sth->finish ();
$dbh->disconnect ();