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

Databases Creating and Modifying Database Tables Creating and Modifying Database Tables Making Changes to a Database

Not sure what I'm missing here...

Please help

Can you post your SQL?

This is what I had for Challenge 1 of 3.... create table rocks(id primary key, name, type, color);

Challenge 2 of 3 is asking... Now, in the MEMBERS table, we'd like to change the FAVORITE_ROCK column to be FAVORITE_ROCK_ID, and it should be a foreign key for the ID column in the ROCKS table.

Unfortunately, in SQLite, ALTER will only let us rename columns. So to add the foreign key constraint we'll need to drop and recreate the table. Start by dropping the MEMBERS table.

1 Answer

Task 2 is just dropping the table

DROP TABLE MEMBERS;

Thank you so much!