A
A
Alic_shadow2017-11-25 19:29:16
Oracle
Alic_shadow, 2017-11-25 19:29:16

How to create a package in oracle?

CREATE OR REPLACE PACKAGE common is 
  FUNCTION kolvo(otdel in varchar2) return number
  IS KOLV_SOTR NUMBER;
  BEGIN
    SELECT COUNT(*)INTO KOLV_SOTR FROM (SELECT * FROM SOTR_1 a, OTDEL b
    WHERE otdel=b.NAME_DEPARTMENT and a.KOD_DEPARTMENT = b.KOD_DEPARTMENT);
  end kolvo;
  procedure perefod(my_shipher sotr_1.shipher%type, my_name_dol list_dol.name_dol%type)
  is
  begin
  update sotr_1 set kod_dol = (select kod_dol from list_dol where name_dol = my_name_dol)
  where my_shipher = sotr_1.shipher;
  end perefod;
end;

When creating packages, it displays the following. message
5a199a13d65e9149141161.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question