1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)

ORACLE Tutorials

PL/SQL examples

SET serveroutput on

DECLARE
v_bonus CONSTANT NUMBER (8, 2) := 0.10;
v_tot_salary NUMBER (10, 2);
v_salary NUMBER (10, 2);
v_employee_id employees.employee_id%TYPE;
BEGIN
SELECT employee_id, salary
INTO v_employee_id, v_salary
FROM employees
WHERE employee_id = 100;

v_tot_salary := v_salary + (v_salary * v_bonus);
DBMS_OUTPUT.put_line ( 'Employee '
|| v_employee_id
|| ' salary is '
|| v_salary
);
DBMS_OUTPUT.put_line ( 'Employee no. '
|| v_employee_id
|| ' has a total salary of '
|| v_tot_salary
);
END;
/


SET serveroutput on

VARIABLE g_salary number

DECLARE
g_salary NUMBER (10, 2);
v_salary NUMBER (10, 2);
BEGIN
SELECT salary
INTO v_salary
FROM employees
WHERE employee_id = 100;

:g_salary := v_salary + 1000;
g_salary := v_salary + 100;
DBMS_OUTPUT.put_line ('Grand salary in block ' || g_salary);
END;
/

PRINT g_salary

Reviews and Comments


PMP, CAPM, PMI is a registered certification mark of the Project Management Institute, Inc

Copyright © www.techfaq360.com 2016


About US | Contact US | Privacy Policy | Terms and Conditions  | Website disclaimer  | Cancellation and Refund Policy  | Shipping & Delivery Policy