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 trialWayne Comber
8,169 PointsCant create movies table for the Quiz
I am having problems with the previous quiz. I entered code to create the movies table, but I was told it was wrong. I used INT instead of INTEGER as my data type for the year. I corrected my SQL statement and processed it again, and I now get the message that the movies table already exists, and so I cant complete the quiz. I was a bit surprised the table existed given my previous code attempts had failed. How am I able to complete the quiz?
3 Answers
kabir k
Courses Plus Student 18,036 PointsYou could either restart the challenge or type the following in the command line
DROP TABLE movies;
and then create the table like so,
CREATE TABLE movies (title VARCHAR(255), year INTEGER);
Joshua Ferdaszewski
12,716 PointsI know this is old and you have probably already figured it out, but to help others who may be asking the same questions here is what I think may be going on. It sounds like only part of your command failed, so the table was still "created" but not to the challenge's spec.
My guess would be a simple restart of the challenge would fix this and allow you to continue. Good luck!
Michael Perry
8,101 PointsYou could also try "DROP TABLE movies;"