Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --1)
- SET SERVEROUTPUT ON
- DECLARE
- message varchar2(20):= 'Hello, World!';
- BEGIN
- dbms_output.put_line(message);
- END;
- --2)
- CREATE OR REPLACE FUNCTION TINC
- (
- NAME_IN IN VARCHAR2
- ) RETURN VARCHAR2 AS
- total_val NUMBER(20);
- BEGIN
- total_val := 0;
- FOR emp in (SELECT income FROM employee WHERE name = name_in)
- LOOP
- total_val := total_val + emp.income;
- END LOOP;
- RETURN total_val;
- END TINC;
- /
- set serveroutput on;
- declare
- income varchar2(20);
- BEGIN
- dbms_output.put_line(TINC('B'));
- END;
- /
- --3)
- set serveroutput on;
- create or replace
- PROCEDURE computeTotalIncome
- AS
- BEGIN
- dbms_output.put_line(TINC('B'));
- END;
- BEGIN
- computeTotalIncome();
- END;
- /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement