BDL2

2012
03.27

1.

CREATE MODULE MAHASISWA;

 

2.

ALTER MODULE MAHASISWA PUBLISH VARIABLE cursor1 CURSOR CONSTANT ( CURSOR FOR SELECT * FROM PRODUCT);

 

 

3.

CREATE PROCEDURE SOAL3 (

IN IN_DEPTNO CHARACTER (3),

IN IN_DEPTNAME VARCHAR (36),

IN IN_MNGRNO CHARACTER (6),

IN IN_ADMRDEPT CHARACTER (3),

IN IN_LOCATION CHARACTER (16)

)

DYNAMIC RESULT SETS 1

P1: BEGIN

END P1

 

ALTER MODULE MAHASISWA PUBLISH PROCEDURE SOAL3 (

IN IN_DEPTNO CHARACTER (3),

IN IN_DEPTNAME VARCHAR (36),

IN IN_MNGRNO CHARACTER (6),

IN IN_ADMRDEPT CHARACTER (3),

IN IN_LOCATION CHARACTER (16)

)

DYNAMIC RESULT SETS 1

P1: BEGIN

END P1

 

 

4.

CREATE OR REPLACE PROCEDURE SOAL3 (

IN IN_DEPTNO CHARACTER (3),

IN IN_DEPTNAME VARCHAR (36),

IN IN_MNGRNO CHARACTER (6),

IN IN_ADMRDEPT CHARACTER (3),

IN IN_LOCATION CHARACTER (16)

)

DYNAMIC RESULT SETS 1

P1: BEGIN

DECLARE cursor1 CURSOR WITH RETURN for

SELECT * FROM DEPARTMENT;

OPEN cursor1;

END P1

 

 

5.

CREATE PROCEDURE SOAL5 (

IN IN_NAME VARCHAR (128),

IN IN_CATLOG XML

)

P1: BEGIN

INSERT INTO CATALOG (NAME, CATLOG)

VALUES (IN_NAME, IN_CATLOG);

END P1