daily pastebin goal
24%
SHARE
TWEET

tštš

a guest Dec 13th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --2
  2. DECLARE
  3. l_ime studenti.ime%type;
  4. l_prezime studenti.prezime%type;
  5. BEGIN
  6.     SELECT
  7.     ime,
  8.     prezime
  9.     INTO
  10.     l_ime,
  11.     l_prezime
  12.     FROM
  13.     STUDENTI
  14.     WHERE
  15.     ID=2;
  16.     IF SQL%FOUND
  17.     THEN
  18.     dbms_output.put_line(l_ime ||' '|| l_prezime);
  19.     END IF;
  20.     END;
  21.  
  22. --3.
  23. DECLARE
  24.   l_ime studenti.ime%type;
  25.   l_prezime studenti.prezime%type;
  26. BEGIN
  27.     SELECT
  28.        ime,
  29.        prezime
  30.     INTO
  31.        l_ime,
  32.        l_prezime
  33.     FROM
  34.        STUDENTI
  35.     WHERE
  36.       ID=3;
  37.     IF SQL%FOUND  THEN
  38.        dbms_output.put_line(SQL%ROWCOUNT);
  39.        dbms_output.put_line(l_ime ||' '|| l_prezime);
  40.     END IF;
  41. END;
  42.  
  43. --4.
  44.  
  45. BEGIN
  46.     UPDATE
  47.       STUDENTI
  48.     SET
  49.       ime='Kristijan'
  50.     WHERE
  51.       id=2;
  52.     IF SQL%FOUND THEN
  53.       dbms_output.put_line('redak upadetan');
  54.     END IF;
  55. END;
  56.  
  57. SELECT * FROM STUDENTI
  58. commit;
  59. rollback;
  60.  
  61. --5.
  62.  
  63. BEGIN
  64.   UPDATE
  65.     AUTOBUSI
  66.   SET
  67.     CIJENA=CIJENA+5
  68.   WHERE
  69.   id=id;
  70.   IF SQL%FOUND THEN
  71.     dbms_output.put_line('Promjenjeno');
  72.   END IF;
  73. END;
  74.    
  75. --6.
  76.  
  77. DECLARE
  78.   CURSOS
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