Descrizione del corso
Il corso Oracle PLSQL Fundamentals fornisce una comprensione approfondita di PL/SQL, esplorando la creazione e l'esecuzione di blocchi anonimi, la dichiarazione e l'utilizzo delle variabili, nonché le strutture di controllo come IF, LOOP e CASE. Viene trattata l'interazione con il server Oracle, l'esecuzione di comandi SQL all'interno di PL/SQL per manipolare dati tramite operazioni come INSERT, UPDATE e DELETE. Sono analizzati anche i cursori espliciti, la gestione delle eccezioni e l'uso di cursori parametrizzati. Viene affrontata la creazione e la gestione di stored procedure, funzioni, pacchetti e trigger, oltre alla gestione avanzata dei ref cursors per ottimizzare l'esecuzione delle query e la manipolazione dei dati.
Programma
PL/SQL: the environment, the benefits
- Types of PL/SQL blocks
- Create and run anonymous blocks
PL/SQL variable declaration
- Types of variables
- Use the DECLARE section to define variables
- Use of variables, storing values in variables
- %TYPE attribute
Write executable blocks
- Syntax in blocks
- Conversion data types
- Nested blocks
- Operators in PL/SQL
- Programming guidelines
Interaction with Oracle Server
- SQL statements in PL/SQL
- SELECT Statements in PL/SQL
- Valorization of PL/SQL variables with SELECT Statement
- Naming convention
- Data manipulation (INSERT, UPDATE, DELETE, MERGE)
- Cursor concept in SQL
- Use SQL cursor attributes to obtain information about DML operations
Control structures
- IF statement, IF THEN ELSE, IF ELSIF END CASE statement
- LOOP statement: BASIC LOOP, WHILE LOOP, FOR LOOP
- Nested loops and labels
Composite data types
- Composite data types
- PL/SQL Records
- Insert and update with PL/SQL Records
- Use INDEX BY Tables
- NESTED TABLE
- VARRAY
Explicit cursors
- What is an explicit cursor?
- Explicit cursor declaration
- Use of explicit cursors
- Explicit cursor attributes
- FOR loop
- Use of subqueries in FOR loops
- Cursors with parameters
- FOR UPDATE clause
- WHERE CURRENT OF clause
- Cursors with subqueries
Exception
- Exception handling with PL/SQL
- Types of exceptions
- Manage pre-defined exceptions
- Handling non-predefined exceptions
- Handling user-defined exceptions
- Propagation of exceptions
- RAISE_APPLICATION_ERROR procedure
Creation of Stored Procedures, Functions, Packages
- Create and invoke procedures
- Create and call functions
- Create and recall packages
- Parameterization
Triggers
- Definition of triggers
- Create a trigger
- Clearing and enabling/disabling triggers
Ref Cursor
- Strong Cursor
- Weak Cursor
- Ref Cursor Management