sql - Why (By Default) Foreign Key is Null ? . . and Can Foreign Key and Primary Key be the same Column? -
i have followed following steps:
- created 2 tables (no constraint)
- alter table#1 (add not null , primary key constraint)
- alter table#2 (add foreign key constraint) . . , trying add primary key constraint column foreign key table#2
got error column can not null.
it practice foreign key reference primary key. getting error because primary key can't set on nullable column. can change primary key identity column ?
Comments
Post a Comment