Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools

Keys and Auto incrementing Values Challenge.

I can't figure out what I'm during wrong. Could someone please help?

Thanks.

Wasn't sure how to link to an image but here is a link to a screen cap of the error:

http://imgur.com/NI2y20l

1 Answer

Off the bat, I see a couple of errors with your SQL. You didn't specify the Data Type of your pk_id. Because it is auto incrementing I would assume it is an INTEGER. Secondly, there is no AUTO_INCREMENTING IT IS AUTO_INCREMENT. So, with those changes your SQL should look something like...

CREATE TABLE t_genres
(pk_id INTEGER AUTO_INCREMENT PRIMARY KEY NOT NULL, 
uk_name VARCHAR(45) NOT NULL UNIQUE KEY);