, A GUIDE TO SQL
Tenth Edition
Mark Shellman
Gaston College
Hassan Afyouni, Ed.D.
e-conn Chief Information Officer
Philip J. Pratt
Grand Valley State University
Mary Z. Last
Australia • Brazil • Mexico • Singapore • United Kingdom • United States
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
, This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
, A Guide to SQL, Tenth Edition © 2021, 2015 Cengage Learning, Inc.
Mark Shellman, Hassan Afyouni, WCN: 02-300
Philip J. Pratt, and Mary Z. Last Unless otherwise noted, all content is © Cengage.
SVP, Higher Education Product ALL RIGHTS RESERVED. No part of this work covered by the
Management: Erin Joyner copyright herein may be reproduced or distributed in any form
or by any means, except as permitted by U.S. copyright law,
VP, Product Management: Thais Alencar
without the prior written permission of the copyright owner.
Product Team Manager: Kristin McNary
Microsoft SQL Server is either a registered trademark or
Associate Product Manager: Danielle Klahr
trademark of Microsoft Corporation in the United States and/or
Product Assistants: Anna Goulart and other countries.
Tom Benedetto
MySQL is a registered trademark, and Oracle is a trademark of
Director, Learning Design: Rebecca von Gillern Oracle Corporation.
Senior Manager, Learning Design: Leigh Hefferon
Learning Designer: Emily Pope For product information and technology assistance,
Vice President, Marketing – Science, contact us at Cengage Customer & Sales Support,
1-800-354-9706 or support.cengage.com.
Technology, & Math: Jason Sakos
Marketing Director: Michele McTighe For permission to use material from this text or product,
submit all requests online at
Marketing Manager: Cassie Cloutier www.cengage.com/permissions.
Product Specialist: Mackenzie Paine
Director, Content Creation: Juliet Steiner Library of Congress Control Number: 2020911488
Senior Manager, Content Creation: Patty Stephan
ISBN: 978-0-357-36168-9
Content Manager: Michele Stulga
Developmental Editor: Joy Dark Cengage
200 Pier 4 Boulevard
Director, Digital Production Services: Krista
Boston, MA 02210
Kellman USA
Digital Delivery Lead: Jim Vaughey
Cengage is a leading provider of customized learning solutions
IP Analyst: Ashley Maynard with employees residing in nearly 40 different countries and
IP Project Manager: Carly Belcher sales in more than 125 countries around the world. Find your
Manufacturing Planner: Ron Montgomery local representative at www.cengage.com.
Production Service/Composition: SPi Global Cengage products are represented in Canada by Nelson
Design Director: Jack Pendleton Education, Ltd.
Text Designer: Lizz Anderson To learn more about Cengage platforms and services,
Cover Designer: Joe Devine,Red Hangar Design register or access your online learning solution, or
Cover image: © vs148/ShutterStock.com purchase materials for your course, visit www.cengage.com.
Notice to the Reader contained herein, the reader willingly assumes all risks
Publisher does not warrant or guarantee any of the in connection with such instructions. The publisher
products described herein or perform any independent makes no representations or warranties of any kind,
analysis in connection with any of the product including but not limited to, the warranties of fitness for
information contained herein. Publisher does not particular purpose or merchantability, nor are any such
assume, and expressly disclaims, any obligation to obtain representations implied with respect to the material set
and include information other than that provided to it forth herein, and the publisher takes no responsibility
by the manufacturer. The reader is expressly warned with respect to such material. The publisher shall not
to consider and adopt all safety precautions that might be liable for any special, consequential, or exemplary
be indicated by the activities described herein and to damages resulting, in whole or part, from the readers’
avoid all potential hazards. By following the instructions use of, or reliance upon, this material.
Printed in the United States of America
Print Number: 01 Print Year: 2020
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Tenth Edition
Mark Shellman
Gaston College
Hassan Afyouni, Ed.D.
e-conn Chief Information Officer
Philip J. Pratt
Grand Valley State University
Mary Z. Last
Australia • Brazil • Mexico • Singapore • United Kingdom • United States
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
, This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
, A Guide to SQL, Tenth Edition © 2021, 2015 Cengage Learning, Inc.
Mark Shellman, Hassan Afyouni, WCN: 02-300
Philip J. Pratt, and Mary Z. Last Unless otherwise noted, all content is © Cengage.
SVP, Higher Education Product ALL RIGHTS RESERVED. No part of this work covered by the
Management: Erin Joyner copyright herein may be reproduced or distributed in any form
or by any means, except as permitted by U.S. copyright law,
VP, Product Management: Thais Alencar
without the prior written permission of the copyright owner.
Product Team Manager: Kristin McNary
Microsoft SQL Server is either a registered trademark or
Associate Product Manager: Danielle Klahr
trademark of Microsoft Corporation in the United States and/or
Product Assistants: Anna Goulart and other countries.
Tom Benedetto
MySQL is a registered trademark, and Oracle is a trademark of
Director, Learning Design: Rebecca von Gillern Oracle Corporation.
Senior Manager, Learning Design: Leigh Hefferon
Learning Designer: Emily Pope For product information and technology assistance,
Vice President, Marketing – Science, contact us at Cengage Customer & Sales Support,
1-800-354-9706 or support.cengage.com.
Technology, & Math: Jason Sakos
Marketing Director: Michele McTighe For permission to use material from this text or product,
submit all requests online at
Marketing Manager: Cassie Cloutier www.cengage.com/permissions.
Product Specialist: Mackenzie Paine
Director, Content Creation: Juliet Steiner Library of Congress Control Number: 2020911488
Senior Manager, Content Creation: Patty Stephan
ISBN: 978-0-357-36168-9
Content Manager: Michele Stulga
Developmental Editor: Joy Dark Cengage
200 Pier 4 Boulevard
Director, Digital Production Services: Krista
Boston, MA 02210
Kellman USA
Digital Delivery Lead: Jim Vaughey
Cengage is a leading provider of customized learning solutions
IP Analyst: Ashley Maynard with employees residing in nearly 40 different countries and
IP Project Manager: Carly Belcher sales in more than 125 countries around the world. Find your
Manufacturing Planner: Ron Montgomery local representative at www.cengage.com.
Production Service/Composition: SPi Global Cengage products are represented in Canada by Nelson
Design Director: Jack Pendleton Education, Ltd.
Text Designer: Lizz Anderson To learn more about Cengage platforms and services,
Cover Designer: Joe Devine,Red Hangar Design register or access your online learning solution, or
Cover image: © vs148/ShutterStock.com purchase materials for your course, visit www.cengage.com.
Notice to the Reader contained herein, the reader willingly assumes all risks
Publisher does not warrant or guarantee any of the in connection with such instructions. The publisher
products described herein or perform any independent makes no representations or warranties of any kind,
analysis in connection with any of the product including but not limited to, the warranties of fitness for
information contained herein. Publisher does not particular purpose or merchantability, nor are any such
assume, and expressly disclaims, any obligation to obtain representations implied with respect to the material set
and include information other than that provided to it forth herein, and the publisher takes no responsibility
by the manufacturer. The reader is expressly warned with respect to such material. The publisher shall not
to consider and adopt all safety precautions that might be liable for any special, consequential, or exemplary
be indicated by the activities described herein and to damages resulting, in whole or part, from the readers’
avoid all potential hazards. By following the instructions use of, or reliance upon, this material.
Printed in the United States of America
Print Number: 01 Print Year: 2020
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.