Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table prova_a (a number, b number);
- alter table prova_a add primary key (a,b);
- create table prova_b (a number, b number);
- alter table prova_b add foreign key (a,b) references prova_a(a,b) ;
- insert into prova_a values (1,2);
- insert into prova_b values (123,null);
- insert into prova_b values (null,123);
- Msg 8111, Level 16, State 1, Line 2
- Cannot define PRIMARY KEY constraint on nullable column in table 'prova_a'.
- Msg 1750, Level 16, State 0, Line 2
- Could not create constraint. See previous errors.
Add Comment
Please, Sign In to add comment