Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table tmp.cesta
- (
- predchazejici_cesta varchar (200),
- pocet_dni varchar (50),
- id_cestovne int,
- id_zeme int,
- foreign key(id_cestovne) references tmp.cestovne (id_cestovne),
- foreign key(id_zeme) references tmp.zeme (id_zeme),
- constraint pk_cesta primary key (id_cestovne, id_zeme)
- )
- go --- nejede
- insert into tmp.cesta ( predchazejici_cesta, pocet_dni, id_cestovne, id_zeme)
- values ('Do Německa', 5, 1, 1)
- insert into tmp.cesta ( predchazejici_cesta, pocet_dni, id_cestovne, id_zeme)
- values ('Do Anglie', 10, 1, 1)
- insert into tmp.cesta ( predchazejici_cesta, pocet_dni, id_cestovne, id_zeme)
- values ('Do České Republiky', 50, 1, 1)
- insert into tmp.cesta ( predchazejici_cesta, pocet_dni, id_cestovne, id_zeme)
- values ('Do USA', 20 , 1, 1)
- Cannot insert the value NULL into column 'id_zeme', table 'TEMPUS.tmp.cesta'; column does not allow nulls. INSERT fails.
Advertisement
Add Comment
Please, Sign In to add comment