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

Error code for SQL

My code: PRAGMA FOREIGN_KEYS = ON; DROP TABLE IF EXISTS MEMBERS; CREATE TABLE IF NOT EXISTS MEMBERS( ID SMALLINT PRIMARY KEY, FIRST_NAME VARCHAR(255), LAST_NAME VARCHAR(255), FAVORITE_ROCK_ID SMALLINT REFERENCES ROCKS(ID) );

Bummer! Start by using a CREATE statement.

1 Answer

Steven Parker
Steven Parker
231,236 Points

Based on the error message, it sounds like you don't need the extra commands before the CREATE statement. Try it by itself.

Also, when asking about challenges, it's helpful to include a link to the challenge page.