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

Anthony Candaele
seal-mask
.a{fill-rule:evenodd;}techdegree
Anthony Candaele
Full Stack JavaScript Techdegree Student 32,135 Points

issue completing sql exercise

Hi Guys,

Currently I'm doing the Database Foundations course by Andrew Chalkley. For some reason I don't get past this exercise:

"Insert a new row into the movies table where the title is the string 'Aliens' and the year is an integer 1986."

I'm typing:

INSERT INTO movies SET title = "Aliens", year = 1986;

but this doesn't get validated, I'm getting the error message that there is an error near SET

Does anyone knows what's wrong with this query??

thanks for your help,

Anthony

3 Answers

Thanks for updating with your solution, Anthony. That's really helpful for others having the same issue. :)

Challenge Task 1 of 3

Insert a new row into the movies table where the title is the string 'Aliens' and the year is an integer 1986.

INSERT INTO movies (title, year) VALUES ("Aliens", 1986);

Challenge Task 2 of 3

Update the film 'Alien' to have the year 1979.

update movies set year = 1979 where title = 'Alien';

Challenge Task 3 of 3

Remove all movies from the year 1985 from the movies table.

DELETE FROM movies WHERE year = "1985";

Herkko Hietanen
Herkko Hietanen
30,501 Points

I don't see why the Anthony's original answer would not qualify. It was my first solution too and seems to work while testing with the workbench.