안녕하세요 기초적인거 같아서 물어보기 민망한데 잘모르겠네요 ㅠㅠ
create table time_slot(
time_slot_id numeric(3,0),
day varchar(3),
start_time numeric(4,0),
end_time numeric(4,0),
primary key (time_slot_id, day, start_time));
create table section(
다른키들 있고
time_slot_id numeric(3,0),
기본키 생성하고
foreign key (time_slot_id) references time_slot);
이 볼드처리한 외래키 생성 구문에서
참조되는 time_slot 테이블을 위한 주워진 키와 일치하는 고유 제약 조건이 없다고 오류뜨네요
time_slot 테이블 기본키가 세 키의 조합인데
그중에서 한키만 참조하려고 해서 그런건가요?
section에 day랑 start_time 추가하면 해결될 것 같긴한데(맞나요..?) 이 방법 뿐인가요?
다른 방법이있나요?