,

Oracle PL/SQL by Example

Paperback Engels 2023 9780138062835
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

Using PL/SQL for Oracle Database 21c, you can build solutions that deliver unprecedented performance and efficiency in any environment, including the cloud. Oracle PL/SQL by Example, Sixth Edition, teaches all the PL/SQL skills you'll need, through real-world labs and extensive examples. Now fully updated for the newest version of PL/SQL 21c, it covers everything from basic syntax and program control through the latest optimization and tuning enhancements.

Step by step, you'll walk through every key task, mastering today's most valuable Oracle 21c PL/SQL programming techniques on your own. Start by downloading the supporting schema and exercises from informit.com/title/9780138062835. Once you've done an exercise, the author doesn't just present the answer: She offers an in-depth discussion introducing deeper insights and modern best practices.

This book's approach fully reflects the author's award-winning experience teaching PL/SQL to professionals at Columbia University in New York City. New database developers and DBAs can use it to get productive fast; experienced PL/SQL programmers will find it to be a superb Oracle Database 21c solutions reference.

New in This Edition Updated code examples throughout New iteration controls for the FOR LOOP statement, such as stepped range, multiple iterations, collection, and cursor iterations Enhancements for PL/SQL qualified expressions Performance enhancements for PL/SQL functions, such as SQL macro, and better control of the result cache

Other Topics Covered Mastering basic PL/SQL concepts and language fundamentals, and understanding SQL's role in PL/SQL Using conditional and iterative program controls Efficiently handling errors and exceptions Working with cursors and triggers, including compound triggers Using stored procedures, functions, and packages to write modular code that other programs can run Working with collections, object-relational features, native dynamic SQL, bulk SQL, and other advanced features

Specificaties

ISBN13:9780138062835
Taal:Engels
Bindwijze:Paperback

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

<p>Preface xvii<br> Introduction to PL/SQL New Features in Oracle 21c xxiii<br><strong>Chapter 1</strong> PL/SQL Concepts 1<br> Lab 1.1: PL/SQL Architecture 2<br> &nbsp;&nbsp;&nbsp; PL/SQL Architecture 2<br> &nbsp;&nbsp;&nbsp; PL/SQL Block Structure 5<br> &nbsp;&nbsp;&nbsp; How PL/SQL Gets Executed 9<br> Lab 1.2: PL/SQL Development Environment 10<br> &nbsp;&nbsp;&nbsp; Getting Started with SQL Developer 10<br> &nbsp;&nbsp;&nbsp; Getting Started with SQL*Plus 13<br> &nbsp;&nbsp;&nbsp; Executing PL/SQL Scripts 14<br> Lab 1.3: PL/SQL: The Basics 18<br> &nbsp;&nbsp;&nbsp; DBMS_OUTPUT.PUT_LINE Statement 18<br> &nbsp;&nbsp;&nbsp; Substitution Variable Feature 21<br> Summary 25<br><strong>Chapter 2</strong> PL/SQL Language Fundamentals 27<br> Lab 2.1: PL/SQL Language Components 27<br> &nbsp;&nbsp;&nbsp; PL/SQL Variables 29<br> &nbsp;&nbsp;&nbsp; PL/SQL Reserved Words 31<br> &nbsp;&nbsp;&nbsp; Delimiters 32<br> &nbsp;&nbsp;&nbsp; Literals in PL/SQL 33<br> Lab 2.2: Anchored Data Types 33<br> Lab 2.3: Scope of a Variable, Block, Nested Blocks, and Labels 35<br> &nbsp;&nbsp;&nbsp; Scope of a Variable 35<br> &nbsp;&nbsp;&nbsp; Nested Blocks and Labels 36<br> Summary 38<br><strong>Chapter 3</strong> SQL in PL/SQL 39<br> Lab 3.1: SQL Statements in PL/SQL 39<br> &nbsp;&nbsp;&nbsp; Initializing Variables with the SELECT INTO Statement 40<br> &nbsp;&nbsp;&nbsp; Using DML Statements in a PL/SQL Block 41<br> &nbsp;&nbsp;&nbsp; Using a Sequence in a PL/SQL Block 43<br> Lab 3.2: Transaction Control in PL/SQL 44<br> &nbsp;&nbsp;&nbsp; The COMMIT, ROLLBACK, and SAVEPOINT Statements 44<br> &nbsp;&nbsp;&nbsp; The SET TRANSACTION Statement 47<br> Summary 48<br><strong>Chapter 4</strong> Conditional Control: IF Statements 49<br> Lab 4.1: IF Statements 50<br> &nbsp;&nbsp;&nbsp; IF-THEN Statements 50<br> &nbsp;&nbsp;&nbsp; IF-THEN-ELSE Statements 52<br> Lab 4.2: ELSIF Statements 55<br> Lab 4.3: Nested IF Statements 59<br> &nbsp;&nbsp;&nbsp; Logical Operators 61<br> Summary 62<br><strong>Chapter 5</strong> Conditional Control: CASE Statements 65<br> Lab 5.1: CASE Statements 65<br> &nbsp;&nbsp;&nbsp; CASE Statements 66<br> &nbsp;&nbsp;&nbsp; Searched CASE Statements 68<br> Lab 5.2: CASE Expressions 74<br> Lab 5.3: NULLIF and COALESCE Functions 78<br> &nbsp;&nbsp;&nbsp; NULLIF Function 78<br> &nbsp;&nbsp;&nbsp; COALESCE Function 80<br> Summary 82<br><strong>Chapter 6</strong> Iterative Control: Part I 85<br> Lab 6.1: Simple Loops 86<br> &nbsp;&nbsp;&nbsp; EXIT Statement 87<br> &nbsp;&nbsp;&nbsp; EXIT WHEN Statement 91<br> Lab 6.2: WHILE Loops 92<br> &nbsp;&nbsp;&nbsp; Using WHILE Loops 92<br> &nbsp;&nbsp;&nbsp; Terminating the WHILE Loop Prematurely 95<br> Lab 6.3: Numeric FOR Loops 97<br> &nbsp;&nbsp;&nbsp; Using the IN Option in the Loop 100<br> &nbsp;&nbsp;&nbsp; Using the REVERSE Option in the Loop 103<br> &nbsp;&nbsp;&nbsp; Using Iteration Controls in the Loop 104<br> &nbsp;&nbsp;&nbsp; Terminating the Numeric FOR Loop Prematurely 108<br> Summary 109<br><strong>Chapter 7</strong> Iterative Control: Part II 111<br> Lab 7.1: CONTINUE Statement 111<br> &nbsp;&nbsp;&nbsp; Using the CONTINUE Statement 112<br> &nbsp;&nbsp;&nbsp; Using the CONTINUE WHEN Statement 116<br> Lab 7.2: Nested Loops 119<br> &nbsp;&nbsp;&nbsp; Using Nested Loops 119<br> &nbsp;&nbsp;&nbsp; Using Loop Labels 120<br> Summary 122<br><strong>Chapter 8</strong> Error Handling and Built-in Exceptions 125<br> Lab 8.1: Handling Errors 125<br> Lab 8.2: Built-in Exceptions 128<br> Summary 133<br><strong>Chapter 9</strong> Exceptions 135<br> Lab 9.1: Exception Scope 135<br> Lab 9.2: User-Defined Exceptions 139<br> Lab 9.3: Exception Propagation 143<br> &nbsp;&nbsp;&nbsp; Re-raising Exceptions 148<br> Summary 149<br><strong>Chapter 10</strong> Exceptions: Advanced Concepts 151<br> Lab 10.1: RAISE_APPLICATION_ERROR 151<br> Lab 10.2: EXCEPTION_INIT Pragma 155<br> Lab 10.3: SQLCODE and SQLERRM 157<br> Summary 160<br><strong>Chapter 11</strong> Introduction to Cursors 161<br> Lab 11.1: Types of Cursors 162<br> &nbsp;&nbsp;&nbsp; Implicit Cursor 162<br> &nbsp;&nbsp;&nbsp; Explicit Cursor 164<br> Lab 11.2: Table-Based and Cursor-Based Records 171<br> &nbsp;&nbsp;&nbsp; Table-Based Records 172<br> &nbsp;&nbsp;&nbsp; Cursor-Based Records 174<br> Lab 11.3: Cursor FOR Loops 175<br> Lab 11.4: Nested Cursors 177<br> Summary 179<br><strong>Chapter 12</strong> Advanced Cursors 181<br> Lab 12.1: Parameterized Cursors 181<br> Lab 12.2: Cursor Variables and Expressions 186<br> &nbsp;&nbsp;&nbsp; Cursor Variables 187<br> &nbsp;&nbsp;&nbsp; Cursor Expressions 193<br> Lab 12.3: FOR UPDATE Cursors 196<br> Summary 199<br><strong>Chapter 13</strong> Triggers 201<br> Lab 13.1: What Triggers Are 201<br> &nbsp;&nbsp;&nbsp; Database Trigger 202<br> &nbsp;&nbsp;&nbsp; BEFORE Triggers 205<br> &nbsp;&nbsp;&nbsp; AFTER Triggers 210<br> &nbsp;&nbsp;&nbsp; Autonomous Transaction 211<br> Lab 13.2: Types of Triggers 213<br> &nbsp;&nbsp;&nbsp; Row and Statement Triggers 213<br> &nbsp;&nbsp;&nbsp; INSTEAD OF Triggers 215<br> Summary 219<br><strong>Chapter 14</strong> Mutating Tables and Compound Triggers 221<br> Lab 14.1: Mutating Tables 221<br> Lab 14.2: Compound Triggers 223<br> Summary 228<br><strong>Chapter 15</strong> Collections 229<br> Lab 15.1: PL/SQL Tables 230<br> &nbsp;&nbsp;&nbsp; Associative Arrays 231<br> &nbsp;&nbsp;&nbsp; Nested Tables 233<br> &nbsp;&nbsp;&nbsp; Collection Methods 236<br> Lab 15.2: Varrays 240<br> Lab 15.3: Multidimensional Collections 245<br> Lab 15.4: Collection Iteration Controls and<br> &nbsp;&nbsp;&nbsp; Qualified Expressions 247<br> &nbsp;&nbsp;&nbsp; Collection Iteration Controls 247<br> &nbsp;&nbsp;&nbsp; Qualified Expressions 251<br> Summary 258<br><strong>Chapter 16</strong> Records 259<br> Lab 16.1: User-Defined Records 259<br> &nbsp;&nbsp;&nbsp; User-Defined Records 260<br> &nbsp;&nbsp;&nbsp; Qualified Expressions with Records 262<br> &nbsp;&nbsp;&nbsp; Record Compatibility 263<br> Lab 16.2: Nested Records 265<br> Lab 16.3: Collections of Records 268<br> Summary 271<br><strong>Chapter 17</strong> Native Dynamic SQL 273<br> Lab 17.1: EXECUTE IMMEDIATE Statements 274<br> &nbsp;&nbsp;&nbsp; EXECUTE IMMEDIATE Statement 275<br> Lab 17.2: OPEN FOR, FETCH, and CLOSE Statements 283<br> Summary 287<br><strong>Chapter 18</strong> Bulk SQL 289<br> Lab 18.1: FORALL Statements 290<br> &nbsp;&nbsp;&nbsp; FORALL Statements 290<br> &nbsp;&nbsp;&nbsp; SAVE EXCEPTIONS Option 294<br> &nbsp;&nbsp;&nbsp; INDICES OF Option 296<br> &nbsp;&nbsp;&nbsp; VALUES OF Option 297<br> Lab 18.2: The BULK COLLECT Clause 299<br> Lab 18.3: Binding Collections in SQL Statements 308<br> &nbsp;&nbsp;&nbsp; Binding Collections with EXECUTE IMMEDIATE Statements 308<br> &nbsp;&nbsp;&nbsp; Binding Collections with OPEN FOR, FETCH, and CLOSE Statements 314<br> Summary 318<br><strong>Chapter 19 </strong>Procedures 319<br> Lab 19.1: Creating Nested Procedures 320<br> &nbsp;&nbsp;&nbsp; Nested Procedures 320<br> &nbsp;&nbsp;&nbsp; Parameter Modes 321<br> &nbsp;&nbsp;&nbsp; Forward Declaration 326<br> Lab 19.2: Creating Stand-Alone Procedures 327<br> Summary 330<br><strong>Chapter 20</strong> Functions 331<br> Lab 20.1: Creating Nested Functions 331<br> Lab 20.2: Creating Stand-Alone Functions 336<br> Summary 340<br><strong>Chapter 21</strong> Packages 341<br> Lab 21.1: Creating Packages 341<br> &nbsp;&nbsp;&nbsp; Creating a Package Specification 342<br> &nbsp;&nbsp;&nbsp; Creating a Package Body 343<br> Lab 21.2: Package Instantiation and Initialization 348<br> &nbsp;&nbsp;&nbsp; Package Instantiation and Initialization 349<br> &nbsp;&nbsp;&nbsp; Package State 351<br> &nbsp;&nbsp;&nbsp; Lab 21.3: SERIALLY_REUSABLE Packages 351<br> Summary 356<br><strong>Chapter 22</strong> Stored Code Advanced Concepts 357<br> Lab 22.1: Subprogram Overloading 357<br> Lab 22.2: Result-Cached Functions 363<br> Lab 22.3: Invoking PL/SQL Functions from SQL Statements 366<br> &nbsp;&nbsp;&nbsp; Invoking Functions in SQL Statements 367<br> &nbsp;&nbsp;&nbsp; Using Pipelined Table Functions 368<br> &nbsp;&nbsp;&nbsp; Using SQL Macros 370<br> Summary 375<br><strong>Chapter 23</strong> Object Types in Oracle 379<br> Lab 23.1: Object Types 380<br> &nbsp;&nbsp;&nbsp; Creating Object Types 381<br> &nbsp;&nbsp;&nbsp; Using Object Types with Collections 385<br> Lab 23.2: Object Type Methods 388<br> &nbsp;&nbsp;&nbsp; Using Constructor Methods 389<br> &nbsp;&nbsp;&nbsp; Using Member Methods 392<br> &nbsp;&nbsp;&nbsp; Using Static Methods 393<br> &nbsp;&nbsp;&nbsp; Comparing Objects 393<br> Summary 398<br><strong>Chapter 24</strong> Storing Object Types in Tables 399<br> Lab 24.1: Storing Object Types in Relational Tables 400<br> Lab 24.2: Storing Object Types in Object Tables 403<br> Lab 24.3: Type Evolution 405<br> Summary 410<br><strong>Chapter 25</strong> Dynamic SQL with the DBMS_SQL Package 411<br> Lab 25.1: Generating Dynamic SQL with the DBMS_SQL Package 412<br> Summary 420<br><strong>Appendix A</strong> PL/SQL Formatting Guide 421<br> Case 421<br> Whitespace 421<br> Naming Conventions 422<br> Comments 423<br><strong>Appendix B</strong> Student Database Schema 425<br> Table and Column Descriptions 425<br><br><br> 9780138062835&nbsp;&nbsp;&nbsp; TOC&nbsp;&nbsp;&nbsp; 4/20/2023<br></p>

Managementboek Top 100

Rubrieken

    Personen

      Trefwoorden

        Oracle PL/SQL by Example