Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Database Foundations Joining Relational Data Between Tables in SQL Keys and Auto-Incrementing Values

YOU SHOULD TRY CREATE TRY WRITE TABLE

Whats wrong is my code guys CREATE TABLE t_genres(pk_Id INTEGER AUTO_INCREMENT primary key, UK_name VARCHAR(45) unique key:)

1 Answer

Ryan Ruscett
Ryan Ruscett
23,309 Points

Hey,

You are soo close lol You have the closing ) after the ;. You always close a sql statement with ; colon last. So switch the colon with the ).

Lastely, you also didn't use a colon. It's super hard to see, but you used : NOT ; Easy mistake to make.

  1. change the : to ;
  2. reverse the ;) to );

It will work!

CREATE TABLE t_genres(pk_Id INTEGER AUTO_INCREMENT primary key, UK_name VARCHAR(45) unique key);

Let me know if that fixes your issue or if I can help in any other way.

Thanks!