1 / 14

Introduction to PL/SQL Programing

Introduction to PL/SQL Programing. Agenda. basic code blocks (unnamed procedures), variable declaration and anchor data types, substitution variables, date and other supplied functions, sequences, synonyms, and abstract data types. What is PL/SQL. Oracle’s extensions to SQL

quanda
Download Presentation

Introduction to PL/SQL Programing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to PL/SQL Programing

  2. Agenda • basic code blocks (unnamed procedures), • variable declaration and anchor data types, • substitution variables, • date and other supplied functions, • sequences, • synonyms, and • abstract data types

  3. What is PL/SQL • Oracle’s extensions to SQL • Procedural in nature • Allow you to write code blocks • Add additional extensions to SQL to • Fill in deficiencies • Add improvements • Anything that is not “Standard SQL” is PL/SQL Guide to Oracle 10g

  4. Code Blocks Allow you to execute an anonymous or unnamed procedure. Unnamed procedures are stored as an SQL file. Stored procedures are stored in the database catalog. Guide to Oracle 10g

  5. Anatomy of a Code Block Guide to Oracle 10g

  6. Substitution variables Prompt for a value inside a code block. Replace or substitute that value for the variable before the code block is executed. Guide to Oracle 10g

  7. Substitution Variables 234 Guide to Oracle 10g

  8. Anchor Data Types When you want a variable’s type to match that of a table column. Guide to Oracle 10g

  9. Demo Time!!! I’ll write some simple PL/SQL Programs - Hello World - Lookup Customer Info

  10. Other PL/SQL constructs

  11. Sequences Like int identity, but not tied to a column or table. Global in nature Order_SEQ.Currval Get current value Order_SEQ.Nextval Next value

  12. Synonyms Create alternate names for existing database objects.

  13. Abstract Data Types Like a table, but used as a type. Simplifies table complexity w/o joins. Guide to Oracle 10g

  14. Questions

More Related