Learning Oracle PL/SQL
PL/SQL, Oracle's programming language for stored procedures, delivers a world of possibilities for your database programs. PL/SQL supplements the standard relational database language, SQL, with a wide range of procedural features, including loops, IF-THEN statements, advanced data structures,...
Autor principal: | |
---|---|
Otros Autores: | |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Sebastopol, California :
O'Reilly
2001.
|
Edición: | First edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627084606719 |
Tabla de Contenidos:
- Table of Contents; Preface; Is This Book for You?; Other Books in This Series; Why This Book?; Which Oracle and PL/SQL Versions?; Organization of This Book; Conventions Used in This Book; Comments and Questions; Acknowledgments; From Bill; From Steven; PL/SQL: What, When, and Where; What Is PL/SQL?; Why SQL Is Not Enough; A Meaty PL/SQL Example; PL/SQL and the Oracle Server; What PL/SQL Is Not; Why Use PL/SQL?; "I'd Rather Use a 'Real' Language Like C!"; Why Should I Use Stored Procedures at All?; "Hey, Isn't Java Where It's At?"; PL/SQL is more concise than Java
- You can call PL/SQL functions directly from SQLPL/SQL can run without human intervention (and without any obvious divine intervention); Many cool Oracle features are only accessible via PL/SQL; When Is PL/SQL the Right Tool for the Job?; The Best of All Worlds; What You Need to Get Started with PL/SQL; Hardware and Operating System; A Licensed Copy of Oracle; Acquiring Oracle; Installing Oracle; A Text Editor; Fundamentals; PL/Lingo; Running Your First PL/SQL Program; Starting SQL*Plus; Entering PL/SQL Statements into SQL*Plus; Saving Scripts to Use Again Later; Exiting SQL*Plus
- Introduction to Program StructureMore About Blocks; Anonymous blocks; Named blocks: procedures and functions; Variables; Datatypes; Strings; Numbers; Dates; Booleans; Declaring Variables; Common Operators; Assignment Operator; Arithmetic Operators; Logical Operators; Non-Null Comparison Operators; Test for Nullity; String Patterns and Wildcards: LIKE, %, _; String Concatenation: ||; Conditional Logic; IF Statements; CASE Statements; Simple CASE statement; Searched CASE statement; CASE expressions; Executing in Circles: Loop Statements; FOR Loop; Simple (Infinite) Loop; WHILE Loop
- Simple or WHILE Loop?Code Formatting: Requirements and Guidelines; Upper- or Lowercase?; Spacing and Line Breaks; Comments; Single-line comments; Multiline comments; Code comments in this book; Some Advanced Fundamentals; NULLs in SQL and PL/SQL; Null strings; Converting NULLs; Can we know for certain?; Naming Rules for Identifiers; Scope of Variables; Advanced User-Defined Datatypes; Let's Code!; Some Background on the Example; The Data Model; The Physical Database Design; A First Programming Exercise; Rationale for the Design; Identify Input, Process, and Outputs
- Implementing a Stored Procedure to Add a BookAnalyzing for design; Syntax to create a procedure; The add_book procedure; Where to handle exceptions; Using the Procedure to Add a Book to the Catalog; Getting a DATE; Arguments optional; Named notation; Retrieving a Book Count with a Function; Syntax for Creating a Function; Code for the book_copy_qty Function; Using the function; Some rules about functions; A "Gotcha" about Exceptions Raised by Functions in the Declaration Section; Make Your Code Resilient; A Results-Checking Utility; A "Unit Tester" for add_book
- Testing the book_copy_qty Function