Appendix C. SQL Join Overview

I don’t know about you, but I have to look a lot of things up. There are a lot of types of joins, and I don’t use most of them regularly. This appendix is really here for me, but maybe you’ll find it helpful as well.

Join Example Database Setup

For this appendix I’ll create a little sample database from the command line. This is completely off the rails, so to speak. You can use either the psql command to jump in on the command line, or you can use one of the GUI tools listed in Appendix B, “Brief Postgres Overview.”

CREATE DATABASE join_examples;\connect join_examples;

Those two lines will create an empty database and then connect to (place you in) that database. Now that we have a ...

Get Data Visualization Toolkit: Using JavaScript, Rails™, and Postgres to Present Data and Geospatial Information now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.