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!

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

Database foundation

In one statement, in the movies table rename the year to release_year and change the type to the type of YEAR.

1 Answer

Grace Kelly
Grace Kelly
33,990 Points

Hi Simbarashe, for this task we need to alter the movies table by changing the column name year to release_year and change its datatype to year, to do this we do the following:

ALTER TABLE movies CHANGE COLUMN year release_year YEAR;

Hope that helps!!