Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET DATEFORMAT dmy
- CREATE TABLE aaa_osobe_mestrovic(
- ime VARCHAR(50),
- prezime VARCHAR(50),
- oib VARCHAR(11) PRIMARY KEY,
- datum_rodenja DATETIME,
- spol CHAR(1),
- visina INT,
- broj_cipela INT
- );
- INSERT INTO aaa_osobe_mestrovic (ime, prezime, oib, datum_rodenja, spol, visina, broj_cipela)
- VALUES
- ('Ante', 'Mestrovic', '11111111111', '01.01.2002', 'm', 200, 45),
- ('ime', 'prezime', '11111111112', '02.02.2002', 'm', 210, 45),
- ('ime', 'prezime', '11111111113', '03.02.2002', 'm', 220, 45),
- ('ime', 'prezime', '11111111114', '04.01.2002', 'm', 230, 45),
- ('ime', 'prezime', '11111111115', '05.01.2002', 'm', 240, 45);
- -- ---------------------------------------------------------
- UPDATE aaa_osobe_mestrovic
- SET ime = 'NovoIme', prezime = 'NovoPrezime'
- WHERE oib = '11111111112';
- UPDATE aaa_osobe_mestrovic
- SET broj_cipela = broj_cipela + 1;
- DELETE FROM aaa_osobe_mestrovic
- WHERE oib = '11111111113';
- -- ---------------------------------------------------------
- SELECT * FROM student
- ORDER BY DatUpis ASC;
- SELECT ime AS Ime, prezime AS Prezime
- FROM student
- WHERE DatRod < '1994-01-01';
- -- ---------------------------------------------------------
- SELECT ime, prezime,naziv FROM ispit, student, predmet
- WHERE sifPredmeta=sifra AND ocjena>=4 AND mbr=mbrStud;
- -- ---------------------------------------------------------
- SELECT * FROM mjesto
- ORDER BY Pbr ASC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement