/*insert into os_udaje
values('121212/1212','Karol','Novy',NULL,NULL,NULL);
insert into os_udaje
values('232323/2323','Karol','Novsi',NULL,NULL,NULL);
insert into os_udaje
values('343434/3434','Karol','Najnosvsi',NULL,NULL,NULL);
insert into os_udaje
values('454545/4545','Karol','Estenovsi',NULL,NULL,NULL);
insert into os_udaje
values('565656/5656','Karol','Estenovsi',NULL,NULL,NULL);
insert into os_udaje
values('676767/6767','Karol','Estenajnovsi',NULL,NULL,NULL);

insert into student
select 123,st_odbor,st_zameranie,'121212/1212','1','5ZI012',null,null,null
from st_odbory
where popis_odboru = 'Informatika' and popis_zamerania is null; 
insert into student
select 90,st_odbor,st_zameranie,'232323/2323','2','5ZSA21',null,null,null
from st_odbory
where popis_odboru = 'Informacne systemy' and popis_zamerania = 'Aplikovana informatika'; */

insert into student
(rod_cislo, os_cislo, rocnik, st_skupina,
st_odbor, st_zameranie)
select rod_cislo, os_cislo, rocnik, st_skupina, st_odbor, st_zameranie
from valentik.osoba;

insert into zap_predmety
(os_cislo, cis_predm, skrok, prednasajuci, ects)
values (123, 'BI11', 2008, 'EX002',1);

insert into zap_predmety
(os_cislo, cis_predm, skrok, prednasajuci, ects)
values (123, 'BI02', 2008, 'KI001',6);

insert into zap_predmety
(os_cislo, cis_predm, skrok, prednasajuci, ects)
values (123, 'BE01', 2003, 'KME01',6);

insert into zap_predmety
(os_cislo, cis_predm, skrok, prednasajuci, ects)
values (90, 'II08', 2006, 'KDS01',5);

insert into zap_predmety
(os_cislo, cis_predm, skrok, prednasajuci, ects)
values (90, 'II07', 2007, 'KI001',5);

insert into zap_predmety
(os_cislo, cis_predm, skrok, prednasajuci, ects)
select os_cislo, cis_predm, skrok, garant, ects
from valentik.skusky sk join predmet_bod using ( cis_predm, skrok )
;
