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 trialninyo
15,367 PointsI'm not understanding why this is not passing?
Create a table called "movies" with a VARCHAR column named "title" and an INTEGER column named "year". The title should be up to 255 characters long.
What I typed in:
CREATE TABLE movies(title VARCHAR(255), year INTEGER);
The error:
SQL Error: table movies already exists
2 Answers
Phillip Gibson
13,805 PointsIn your testing, you might have already created a table called movies. If you change the CREATE
to ALTER
it should work. Alternatively, you could DROP
the whole table first and then recreate it. ie.
DROP TABLE movies;
CREATE TABLE movies(title VARCHAR(255), year INTEGER);
ninyo
15,367 PointsThanks Philip, I'm in uncharted territory now in terms of language lol. I did however passed the lesson right after you sent the message, so it was great knowing that I can DROP TABLE movies to start over and then recreate it by calling the statement again.
Phillip Gibson
13,805 PointsGlad to help. :)