Name the package LOGINPKG CREATE OR REPLACE PACKAGE REFERENCEPKG IS PROCEDURE

Name the package loginpkg create or replace package

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

variables specified earlier. Name the package LOGIN_PKG. CREATE OR REPLACE PACKAGE REFERENCE_PKG IS PROCEDURE user_reference (user IN VARCHAR2, pass IN VARCHAR2, id OUT NUMBER, zip OUT NUMBER); END; CREATE OR REPLACE PACKAGE BODY REFERENCE_PKG IS PROCEDURE user_reference (user IN VARCHAR2, pass IN VARCHAR2, id OUT NUMBER, zip OUT NUMBER) IS ZIP_CODE NUMBER(5); SHOPPER_ID NUMBER(2); BEGIN SELECT IDSHOPPER, SUBSTR(ZIPCODE,1,3) INTO SHOPPER_ID, ZIP_CODE FROM BB_SHOPPER WHERE USERNAME = user and PASSWORD = pass; id := SHOPPER_ID; zip := ZIP_CODE; END; END;
Image of page 1
Ramoi Hammond Database Development II 3. Use an anonymous block to test the packaged procedure, using the username gma1 (it is gma and the number one) and the password goofy to verify that the procedure works correctly. Use DBMS_OUTPUT statements in an anonymous block to display the values stored in the packaged variables. This includes the shopper ID and the first three digits of the shopper's zip code.
Image of page 2
Ramoi Hammond Database Development II
Image of page 3

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture