O'Reilly logo

CompTIA® Linux+ / LPIC-1 Cert Guide: (Exams LX0-103 & LX0-104/101-400 & 102-400) by Sean Walberg, Ross Brunson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced Joins

The data earlier was ideal: Every book had an author and every author had a book. But the real world is not so ideal. A book may have no sales, or the author isn’t in the system.

The query used in the previous section is called an inner join. It requires that each result row have a row from both the left and right tables; otherwise, the row doesn’t make it to the result.

Consider a new author table where there’s an author who hasn’t written any books:

sqlite> SELECT * FROM author;id   first_name  last_name---  ----------  ----------1    Sean        Walberg2    Ross        Brunson3    Ada         Lovelacesqlite> SELECT * FROM book WHERE author_id= 3;sqlite>

The report on books and authors doesn’t even ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required