Hi,

I want to create a table and columns based on an existing schema. I
have dumped (mysqldump) the database to disk without the data, so I
have a file with statements like:

-- Table structure for table `foo`
--

DROP TABLE IF EXISTS `foo`;
CREATE TABLE `foo` (
  `bar` bigint(20) NOT NULL default '0',
...
.


Is there a way I can use these definitions and use DBI to create the schema?

I want to use DBI so I can specify a user/password when I create the
tables rather than doing something like:

mysql < dump.file

which would use the user's credentials.

I can't see much in the docs that can do table level statement, or am
I being blind!

Thanx,
Dp.

Reply via email to