From the course: PostgreSQL Essential Training

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Join tables for additional information

Join tables for additional information - PostgreSQL Tutorial

From the course: PostgreSQL Essential Training

Join tables for additional information

- [Instructor] Relational databases are made up of multiple tables that use primary and foreign key relationships to tie data rows together. This is an efficient way to organize data for the database management system, but it can make it a little more difficult to get information from your tables if you're looking at them one at a time. For example, I'm going to write a quick query that takes a look at all of our product data again. I'll execute SELECT star FROM manufacturing.products, and this time I want to focus on just the first product listed here. Let me readjust these column widths by dragging on this bar here, so we can see all the category IDs at the same time. Here I have the basic product details including the category ID, but what exactly does category ID number four mean? To answer that question, we need to look at the related categories table. I'll modify the query to SELECT star FROM…

Contents