PLSQL_8_1_Practice.docx - www.oracle.com\/academy Database Programming with PL\/SQL 8-1 Creating Procedures Practice Activities Vocabulary Identify the

PLSQL_8_1_Practice.docx - www.oracle.com/academy Database...

This preview shows page 1 - 3 out of 5 pages.

Database Programming with PL/SQL 8-1: Creating Procedures Practice Activities Vocabulary Identify the vocabulary word for each definition below: Subprograms Named PL/SQL blocks that are compiled and stored in the database. Indicates the DECLARE section of a subprogram. Anonymous Blocks Unnamed executable PL/SQL blocks that cannot be reused or stored in the database for later use. Procedures Named PL/SQL blocks that can accept parameters and are compiled and stored in the database. Try It / Solve It 1. What is the difference between the following two pieces of code?
Image of page 1
2 Code A is an anonymous block which is an unnamed block of code. - Is not stored in the database - Complied each time it is used - Cannot return values - Cannot take parameteres CODE SAMPLE B CREATE PROCEDURE pay_raise (p_empid employees employee_id%TYPE, p_percent_increase NUMBER) IS BEGIN UPDATE employees SET salary = (salary * p_percent_increase) + salary WHERE employee_id = p_empid; END pay_raise; Code B is a subprogram named pay_raise.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 5 pages?

  • Fall '15
  • pieces of code

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture