http://www.go4expert.com/forums/showthread.php?t=13386
im following the article above and i am getting error at the first quoted code
#1049 - Unknown database 'library'
CREATE TABLE `library`.`books` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 150 ) NOT NULL ,
`author_id` INT UNSIGNED NOT NULL ,
PRIMARY KEY ( `id` ) ,
INDEX ( `author_id` )
) ENGINE = INNODB
the other one generates with no problem but this one, why?
Your table name is prepended with the database name “library”. Probably your DB is named differently. If you’re executing within the DB that you’re using just remove the “
library.” prefix.