13 Jan 12:08
for kacpi
SELECT '' AS zadanie_16 FROM dual;
CREATE SEQUENCE PRAC_SEQ START WITH 300 INCREMENT BY 10;
SELECT '' AS zadanie_17 FROM dual;
INSERT INTO PRACOWNICY (ID_PRAC, NAZWISKO, ETAT, PLACA_POD)
VALUES (PRAC_SEQ.NEXTVAL, 'TRĄBCZYŃSKI', 'STAZYSTA', 1000);
SELECT * FROM PRACOWNICY WHERE NAZWISKO = 'TRĄBCZYŃSKI';
SELECT '' AS zadanie_18 FROM dual;
UPDATE PRACOWNICY
SET PLACA_DOD = PRAC_SEQ.CURRVAL
WHERE NAZWISKO = 'TRĄBCZYŃSKI';
SELECT * FROM PRACOWNICY WHERE NAZWISKO = 'TRĄBCZYŃSKI';
SELECT '' AS zadanie_19 FROM dual;
DELETE FROM PRACOWNICY WHERE NAZWISKO = 'TRĄBCZYŃSKI';
SELECT '' AS zadanie_20 FROM dual;
CREATE SEQUENCE MALA_SEQ MAXVALUE 10;
SELECT MALA_SEQ.NEXTVAL FROM dual;
SELECT '' AS zadanie_21 FROM dual;
DROP SEQUENCE MALA_SEQ;