S_pot
SQL_외래키(foreign key) 본문
-- dept테이블의 deptno를 참조하는 외래키적용
alter table student
add constraint student_fk foreign key(deptno) references dept(deptno);
'SQL' 카테고리의 다른 글
SQL_한글값 insert ??뜰때 (0) | 2021.06.22 |
---|---|
SQL_Check제약조건, 숫자 1자 제한 (0) | 2021.06.22 |
SQL_Unique제약조건 (0) | 2021.06.22 |
SQL_쿼리문: 기본키설정, not null, (0) | 2021.06.22 |
SQL_VARCHAR와 CHAR: 가변길이, 고정길이 (0) | 2021.06.21 |