Loading topic
SELECT, FROM, WHERE, and ORDER BY syntax, and that a primary key identifies a row while a foreign key refers to a key in another table.2 min readSELECT, FROM, WHERE, and ORDER BY syntax. You should also understand that a primary key identifies a row and a foreign key stores a related row's key.1 min readSELECT, FROM, WHERE, and ORDER BY syntax, and that you understand primary keys and foreign keys. The examples use customers and orders, where orders.customer_id refers to customers.id.2 min readSELECT, FROM, and WHERE syntax, plus primary and foreign keys. This chapter focuses on how the ON clause decides which rows an inner join pairs.2 min readSELECT, WHERE, and ORDER BY syntax, primary and foreign keys, and a two-table INNER JOIN. A multi-table join applies the same idea repeatedly: each join adds rows that match the new table.2 min readSELECT, FROM, WHERE, and ORDER BY syntax, and that you understand primary keys and foreign keys. We use the customers and orders tables from the earlier examples.2 min readSELECT, FROM, WHERE, and ORDER BY syntax, and that you understand primary keys and foreign keys.2 min readSELECT, FROM, WHERE, and ORDER BY, plus the difference between a primary key and a foreign key. The examples use the orders and order_items tables from the sample schema.2 min readSELECT, FROM, WHERE, and ORDER BY syntax, and understand primary keys and foreign keys. This chapter uses the customers and orders tables from earlier examples.1 min readSELECT syntax, primary and foreign keys, table aliases, and the ON clause. A self join uses one table twice in the same query. Each use gets a different alias, so each alias can play a different role.1 min readSELECT, FROM, WHERE, and ORDER BY syntax. You should also understand primary keys, foreign keys, and ordinary equality joins.2 min readSELECT, table aliases, primary keys, and foreign keys. You should also know the basic INNER JOIN ... ON ... form. SQL provides two shorthand forms for equality joins: USING and NATURAL JOIN.2 min readSELECT, FROM, WHERE, and ORDER BY syntax, and that you understand primary and foreign keys.2 min readSELECT, FROM, WHERE, and ORDER BY syntax. You should also understand primary keys, foreign keys, and how an INNER JOIN keeps only rows that match on both sides.2 min readSELECT, FROM, WHERE, and ORDER BY syntax, and that you understand primary keys and foreign keys. This chapter explains how a database finds matching rows for an inner join and how to check whether that work is efficient.2 min readSELECT, FROM, WHERE, ORDER BY, primary keys, and foreign keys. It also assumes the example database contains customers, orders, and order_items.2 min read