MySQL Forums
Forum List  »  Newbie

Multiple Table Creation
Posted by: gw1500se gw1500se
Date: May 21, 2011 07:47AM

I need another pair of eyes to see what I am missing. This is simple but I just cannot see what is wrong. I have a file that creates my database and tables. The problem is that when I have a single create table, it works but as soon as I add additional create table statements, I get syntax errors on the subsequent statements. Here is my file:
create database if not exists Erics_BBQ;
use Erics_BBQ;
create table if not exists Products (
        Item_Number int unsigned key not null,
        Category enum('Beef','Chicken','Pork','Turkey','Misc.') not null,
        Product varchar (80) not null,
        Description varchar (4096) not null,
        Units enum('lb.','oz.','ea.','pt.','qt.','dz.') not null,
        Price decimal(5,2)not null
);
create table if not exists Updates (
        Last_Update date not null;
        Update_by varchar (8) not null;
);
When I comment out the second create table statement, it works fine. What am I not seeing? TIA.

Options: ReplyQuote


Subject
Written By
Posted
Multiple Table Creation
May 21, 2011 07:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.