- ๐ Hi, Iโm @MATT68
- ๐ Iโm interested in data managing, analyze, administering, all ...
- ๐ฑ Iโm currently learning mongodb, docker, data science
- ๐๏ธ Iโm looking to collaborate on data science projects
- ๐ซ matiyoli at gmail.com
sql-intermedio's Introduction
sql-intermedio's People
sql-intermedio's Issues
Ejemplo PL
DECLARE
TIPO CHAR;
R_DEPT DEPARTMENTS%ROWTYPE;
MSG VARCHAR2(50);
BEGIN
TIPO := 'I';
R_DEPT.DEPARTMENT_NAME := 'PRUEBAS1';
R_DEPT.MANAGER_ID := 190;
R_DEPT.LOCATION_ID := 1700;
P_DEPARTMENT(TIPO, R_DEPT, MSG);
DBMS_OUTPUT.PUT_LINE(MSG);
END;
CREATE OR REPLACE PROCEDURE P_DEPARTMENT
(TIPO CHAR,
R_DEPT DEPARTMENTS%ROWTYPE,
MSG OUT VARCHAR2)
IS
v_dept EMPLOYEES.DEPARTMENT_ID%TYPE;
v_employee_id EMPLOYEES.EMPLOYEE_ID%TYPE;
v_dept_name DEPARTMENTS.DEPARTMENT_NAME%TYPE;
contador INTEGER := 1 ;
BEGIN
CASE TIPO
WHEN 'I' THEN
DBMS_OUTPUT.PUT_LINE(' Llamada de tipo INSERT ');
INSERT INTO departments
( department_id, department_name, manager_id, location_id )
VALUES (SEQ_DEPARTMENT.NEXTVAL, r_dept.department_name,
r_dept.manager_id, r_dept.location_id);
MSG := ' 01 - Insertado departamento con cรณdigo : ' || SEQ_DEPARTMENT.CURRVAL;
WHEN 'U' THEN
DBMS_OUTPUT.PUT_LINE(' Llamada de tipo UPDATE ');
UPDATE departments
SET department_name = r_dept.department_name,
manager_id = r_dept.manager_id,
location_id = r_dept.location_id
WHERE department_ID = r_dept.location_id;
MSG := ' 02 - Actualizado el Departamento : ' || r_dept.location_id;
WHEN 'D' THEN
DBMS_OUTPUT.PUT_LINE(' Llamada de tipo DELETE ');
DELETE FROM departments
WHERE department_ID = r_dept.location_id;
MSG := ' 03 - Borrado el Departamento : ' || r_dept.location_id;
ELSE
MSG := ' 04 - TIPO DE LLAMADA INCORRECTA ';
END CASE;
END;
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.