Skip to Content
《Head First SQL》 (Chinese Edition), 2nd Edition
book

《Head First SQL》 (Chinese Edition), 2nd Edition

by Kimberly Fessel
June 2026
740 pages
13h 7m
Chinese
O'Reilly Media, Inc.
Content preview from 《Head First SQL》 (Chinese Edition), 2nd Edition

第 10 章 连接 与联合:多表操作

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

Image

欢迎进入多表世界。数据库中拥有多个表固然很好,但您需要学习一些新的操作步骤,才能让这些表相互协作。连接操作可帮助您暂时 匹配相关数据 ——这些数据原本是为了清晰和组织而刻意分置在不同表中的。正如你很快将了解的那样,有几种不同的连接方法可用于将表配对。术语 交叉连接内连接左连接, 右连接以及 全外连接 这些概念可能还未在你脑海中浮现,但读完本章后,你将对它们有足够深入的了解,从而能选择最合适的连接方式,在评委面前大放异彩。你还将了解到 自连接 ,以及用于合并多个查询结果的 UNION。掌握了这些新技巧后,你很快就能学会如何将所有数据整合在一起,并以你所需的任何同步形式呈现。

是时候加入这场“连接”派对了

卡洛韦夏令营的数据管理员墨菲夫人已经完全康复,并重掌大局。在第9章她缺席期间,柯林斯教练尽了最大努力整理营员的信息,但现在,真正有趣的数据工作才刚刚开始。

Image

如果你曾听人谈论过 SQL,那么你很可能也听过“连接(join)”这个词。 连接 并没有你想象中那么复杂。归根结底,它能让你将来自多个数据库表的信息进行匹配。在本章中,我们将带你深入了解联接,展示其工作原理,并给你大量机会去摸索何时应该使用联接,以及该使用哪种 哪种连接

顺便提一下,事务型和分析型 SQL 用户经常编写连接语句。

连接操作允许您匹配来自多个 SQL 表的数据。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Overcome a Power Deficit

How to Overcome a Power Deficit

Cyril Bouquet, Jean-Louis Barsoux
Relational Power Is the New Currency of Hybrid Work

Relational Power Is the New Currency of Hybrid Work

Lebene Soga, Yemisi Bolade-Ogunfodun, Nazrul Islam, Joseph Amankwah-Amoah

Publisher Resources

ISBN: 0642572408114