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

Development Tools Database Foundations Manipulating Schema with SQL Adding Columns

Philip Bessa
Philip Bessa
5,396 Points

Challenge broken? (task 1)

It's either broken or I don't get it.

Add a column to the movies table called 'genre' and is of type VARCHAR up to 25 characters in length.

ALTER TABLE movies_table ADD COLUMN genre VARCHAR(25);

Bummer! You're not using 'ADD' to add a column to the movies table.

Philip Bessa
Philip Bessa
5,396 Points

So the solution is:

ALTER TABLE movies ADD COLUMN genre VARCHAR(25);

This whole time in the videos we're dealing with "movie_table" and the like, so the challenge has similar but different table names which make it harder to get the names right instead of the syntax. The other two challenges are just as weird.

1 Answer

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi Philip,

The table is called 'movies', not 'movies_table'

Hope this helps

Philip Bessa
Philip Bessa
5,396 Points

Thank you! I think it would be more clearer if the table was a different name entirely to avoid confusing it to the workspace stuff.

John Steer-Fowler
John Steer-Fowler
Courses Plus Student 11,734 Points

Yeah, I agree actually.

By the way, you could also cut out some of the syntax from that statement.

You could write it like this:

ALTER TABLE movies ADD genre VARCHAR(25)

Compared to this:

ALTER TABLE movies ADD COLUMN genre VARCHAR(25);

Less typing equals more time to relax :D