Jump to content
Larry Ullman's Book Forums

Table Already Exists In Mysql


Recommended Posts

<code>

CREATE TABLE IF NOT EXISTS `award` (
  `award_id` int(11) NOT NULL AUTO_INCREMENT,
  `show_year` varchar(6) NOT NULL,
  `category_id` varchar(10) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `FirstPrize` varchar(40) DEFAULT NULL,
  `SecondPrize` varchar(40) DEFAULT NULL,
  `ThirdPrize` varchar(40) DEFAULT NULL,
  `FourthPrize` varchar(40) DEFAULT NULL,
  `HighlyCommended` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`award_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ;
</code>

 

When I run the above command I get the response:

 

"#1050 - Table '`mwwg`.`award`' already exists"

 

If I then run "show tables;" the table "award" does not show up.

 

Any clues??

Link to comment
Share on other sites

Sorry guys but I am having trouble posting the screen shots.

 

Anyway, when using the command line the first screen lists all the tables in the database.  The table "award" does not show up.

The second shows what happens when I try to create the table.

It returns:

ERROR 1050 (42S01): Table ''mwwg'.'award' already exists''

Link to comment
Share on other sites

 Share

×
×
  • Create New...