Hi,
I noticed a small typo and corrected it.
I am running mysql Server version: 3.23.49-log
I am in the process of creating a table
I created it manually in mysql with the following code:
create table tbl (table_number int(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,
table_status int(1));
This worked.
Now I am trying to do the exact thing via a perl script and I keep getting error 1064
ie syntax error.
Mysql does not like the "NOT NULL AUTO_INCREMENT PRIMARY KEY" in the code. I tried
without it and that works in the perl script. But then I cannot create a table with a
primary key etc.
----see code below----
my $dbh = DBI->connect($driverString, $username, $pwd,
{'RaiseError' => 1});
#create a new table tbl --comment--
$dbh->do("CREATE TABLE tbl (table_number INTEGER(4) NOT NULL AUTO_INCREMENT PRIMARY
KEY, table_status INTEGER(1))");
Thanks.
Radhika