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 Joining Relational Data Between Tables in SQL Joining Tables and Aliasing

Alex Flores
Alex Flores
7,864 Points

There has to be an easier way to update tables?

I get everything, but the way he's going about updating the movies table to include the movie genres by joining the two tables seems incredibly painful. What I mean is, he only updated two movies to include the genre, he still had 100+ to do. What if you're working with an incredible amount of data and you have to manually update all of them. Is there not an easier way to do this?

For instance, could I not put my data table into an excel file first and then deconstruct it inside SQL? Does my question make sense?

1 Answer

Steven Parker
Steven Parker
228,025 Points

The method shown in the video is primarily just for demonstration.

As you noted, it would be a bit of a pain to insert the data this way for every row.

Databases do generally have a mechanism for importing data from other sources, and many of them will accept Excel files as the import source. Even when that's not directly available, you can export your Excel data to CSV format, which is pretty much universally accepted, and also can be easily converted into SQL statements if needed.