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

Alexander Tam
371 PointsDatabases
This seems really easy, but I don't know why I'm coming across this error.
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.
I put:
create table movies (title varchar(255), year integer);
The error:
The types for title and year are incorrect. Use VARCHAR(255) and INTEGER respectively.
Any ideas because this is exactly how the setup was in the video?
13 Answers

Chase Lee
29,275 PointsCapitalize CREATE
, TABLE
, VARCHAR
, and INTEGER
.

ninyo
15,367 PointsI'm not understanding why this is not working?
CREATE TABLE movies (title VARCHAR(255), year INTEGER);
Juliano Vargas
Courses Plus Student 15,575 Pointsit keeps telling me that SQL Error: table movies already exists

SrBilyon Harris
11,243 PointsI'm having the same problem to this day. I guess I'll skip it for now :(

SrBilyon Harris
11,243 PointsI'm having the same problem to this day. I guess I'll skip it for now :(

Jesse Stewart
8,851 PointsThis is what ended up being correct:
CREATE TABLE movies (title VARCHAR(255), year INTEGER);

Tolga CANATAN
8,995 PointsHi everyone,
When I typed these codes;
CREATE TABLE movies (title VARCHAR(255), year INTEGER);
I got this error;
SQL Error: table movies already exists.
:(

Yan Cruz
20,439 PointsCREATE TABLE movies (title VARCHAR(255), year INTEGER);
works for me lol

Ali Syed
Courses Plus Student 565 Pointsyou need to go back, then skip to where you left off

Ali Syed
Courses Plus Student 565 Pointsthen CREATE TABLE movies (title VARCHAR(255), year INTEGER);

Fenian Noakes
Courses Plus Student 5,212 PointsHI all - just incase someone else comes across this. don't use the full word INTEGER; instead just use INT. That worked for me. Cheers.

Michael Stopa
14,965 PointsIt's not a bug, it's a feature:)) Same error on my end.

Ary de Oliveira
28,298 PointsDatabase Foundations:
Challenge Task 1 of 2
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. Type in your command below, then press Enter.
CREATE TABLE movies (title VARCHAR(255), year INTEGER);
Challenge Task 2 of 2
Create a table called "actors" with a VARCHAR column named "name". The name should be up to 50 characters long. Type in your command below, then press Enter.
CREATE TABLE actors (name VARCHAR(50));
Juliano Vargas
Courses Plus Student 15,575 PointsCREATE TABLE movies (title VARCHAR(255), year INTEGER);
what's wrong with my sql query?
Juliano Vargas
Courses Plus Student 15,575 PointsBummer! There's something wrong with your SQL statement. Please review your code and try again. Try again
CREATE TABLE movies (title VARCHAR(255), year INTEGER); Checking your answer...
Results Hide

David Ruiz
4,802 PointsThere is something wrong their side. A bit disappointing...

MUZ141021 Owen Magumise
3,747 Pointsgetting the same error also,, quite disappointing
Nicholas Lee
12,474 PointsNicholas Lee
12,474 PointsIn "real' mysql capitalization is not necessary.