Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
218,814 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.