Oracle
®
PL/SQL
™
by Example
FOURTH EDITION
This page intentionally left blank
Oracle
®
PL/SQL
™
by Example
FOURTH EDITION
BENJAMIN ROSENZWEIG
ELENA SILVESTROVA RAKHIMOV
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco • New York •
Toronto • Montreal • London • Munich • Paris • Madrid • Cape Town • Sydney •
Tokyo • Singapore • Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and the publisher was aware of a trademark
claim, the designations have been printed with initial capital letters or in all capitals.
The authors and publisher have taken care in the preparation of this book, but make no expressed or
implied warranty of any kind and assume no responsibility for errors or omissions. No liability is
assumed for incidental or consequential damages in connection with or arising out of the use of the
information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or
special sales, which may include electronic versions and/or custom covers and content particular to your
business, training goals, marketing focus, and branding interests. For more information, please contact:
U.S. Corporate and Government Sales
800-382-3419
corpsales@pearsontechgroup.com
For sales outside the United States, please contact:
International Sales
international@pearson.com
Visit us on the Web: www.informit.com/ph
Library of Congress Cataloging-in-Publication Data
Rosenzweig, Benjamin.
Oracle PL/SQL by example / Benjamin Rosenzweig, Elena Silvestrova Rakhimov.
p. cm.
ISBN 0-13-714422-9 (pbk. : alk. paper) 1. PL/SQL (Computer program language) 2. Oracle
(Computer file) 3. Relational databases. I. Rakhimov, Elena Silvestrova. II. Title.
QA76.73.P258R68 2008
005.75’6—dc22
2008022398
Copyright © 2009 Pearson Education, Inc. All rights reserved. Printed in the United States of America.
This publication is protected by copyright, and permission must be obtained from the publisher prior to
any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means,
electronic, mechanical, photocopying, recording, or likewise.
For information regarding permissions, write to:
Pearson Education, Inc.
Rights and Contracts Department
501 Boylston Street, Suite 900
Boston, MA 02116
Fax: (617) 671 3447
ISBN-13: 978-0-137-14422-8
ISBN-10: 0-137-14422-9
Text printed in the United States on recycled paper at Edwards Brothers in Ann Arbor, Michigan
First printing August 2008
Editor-in-Chief: Mark Taub
Acquisitions Editor: Trina MacDonald
Development Editor: Songlin Qiu
Managing Editor: Kristy Hart
Project Editor: Todd Taber
Copy Editor: Gayle Johnson
Indexer: Erika Millen
Proofreader: Debbie Williams
Technical Reviewers: Oleg Voskoboynikov,
Shahdad Moradi
Publishing Coordinator: Olivia Basegio
Cover Designer: Chuti Prasertsith
Composition: Nonie Ratcliff