Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET SERVEROUTPUT ON;
- DECLARE
- v_titlu carti.titlu%TYPE;
- v_exemplare carti.titlu%TYPE;
- BEGIN
- SELECT titlu, nr_exemplare INTO v_titlu ,v_exemplare FROM carti WHERE id_carte = 888;
- DBMS_OUTPUT.PUT_LINE('Titlu carte: ' || v_titlu);
- DBMS_OUTPUT.PUT_LINE('Numarul initial de exemplare: ' || v_exemplare);
- IF v_exemplare < 100 THEN v_exemplare :=v_exemplare * 1.5;
- ELSIF v_exemplare BETWEEN 100 AND 150 THEN v_exemplare := v_exemplare *1.3;
- ELSE v_exemplare := v_exemplare *1.2;
- END IF;
- DBMS_OUTPUT.PUT_LINE('Numarul final de exemplare: ' || v_exemplare);
- END;
- /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement