SHARE
TWEET

Untitled

a guest May 21st, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. SET SERVEROUTPUT ON;
  3. DECLARE
  4. v_titlu carti.titlu%TYPE;
  5. v_exemplare carti.titlu%TYPE;
  6. BEGIN
  7. SELECT titlu, nr_exemplare INTO v_titlu ,v_exemplare FROM carti WHERE id_carte = 888;
  8. DBMS_OUTPUT.PUT_LINE('Titlu carte: ' || v_titlu);
  9. DBMS_OUTPUT.PUT_LINE('Numarul initial de exemplare: ' || v_exemplare);
  10. IF v_exemplare < 100 THEN v_exemplare :=v_exemplare * 1.5;
  11. ELSIF v_exemplare BETWEEN 100 AND 150 THEN v_exemplare := v_exemplare *1.3;
  12. ELSE v_exemplare := v_exemplare *1.2;
  13. END IF;
  14. DBMS_OUTPUT.PUT_LINE('Numarul final de exemplare: ' || v_exemplare);
  15. END;
  16. /
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top