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 trialAlivia Blount
543 PointsI am not sure why my code is not working? What am I missing? CREATE TABLE movies (title VARCHAR, year INTEGER(255));
I watched the video a few time I have used the CREATE variable and them told ruby what to create a TABLE called movies. I then creates two columns a title column with input VARCHAR and a year column with INTEGER input that can be 255 characters long.
2 Answers
Charlie Thomas
40,856 PointsThe title needs to be 255 characters long not the year. So put (255) after VARCHAR not INTEGER.
CREATE TABLE movies (title VARCHAR(255), year INTEGER);
Kamran Ismayilov
5,753 PointsYou need just change 255 to VARCHAR not to Year