MySQL Forums :: Newbie :: Problem creating table with 2 primary keys


Advanced Search

Problem creating table with 2 primary keys
Posted by: Junior P ()
Date: June 17, 2013 07:19PM

This is the exact statement from a mysql texebook:

CREATE TABLE album (
artist_id (5) NOT NULL,
album_id INT (4) NOT NULL AUTO_INCREMENT,
album_name CHAR(128) DEFAULT NULL,
PRIMARY KEY (artist_id, album_id)
);

Does anyone know why it wont work when I run it?

Options: ReplyQuote


Subject Written By Posted
Problem creating table with 2 primary keys Junior P 06/17/2013 07:19PM
Re: Problem creating table with 2 primary keys John Smith 06/17/2013 08:02PM
Re: Problem creating table with 2 primary keys Junior P 06/17/2013 08:55PM
Re: Problem creating table with 2 primary keys John Smith 06/17/2013 09:03PM
Re: Problem creating table with 2 primary keys Rick James 06/17/2013 09:01PM
Re: Problem creating table with 2 primary keys Junior P 06/17/2013 09:18PM
Re: Problem creating table with 2 primary keys Rick James 06/18/2013 08:39PM
Re: Problem creating table with 2 primary keys Andrea Croci 06/19/2013 12:41AM
Re: Problem creating table with 2 primary keys Junior P 06/25/2013 04:16PM
Re: Problem creating table with 2 primary keys Rick James 06/25/2013 10:27PM
Re: Problem creating table with 2 primary keys Junior P 06/26/2013 05:08PM


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.