그림 그림 ID 및 고객 ID가 외래 키 역할을하며 각 테이블의 기본 키 역할을하는 customers_id 및 painting_id에 해당하는 Order 테이블을 만듭니다. Int와 동일한 데이터 유형을 가지고 있습니다. 이 오류를 검색했지만 가능한 해결책을 찾을 수 없습니다.오류 1215 : 외래 키 제약 조건을 추가 할 수 없습니다 MySQL 오류
use artgallery;
CREATE TABLE item_order(
order_id INT UNIQUE NOT NULL auto_increment,
customer_id INT UNIQUE NOT NULL ,
paintings_id INT UNIQUE NOT NULL ,
primary key(order_id),
FOREIGN KEY (customer_id) REFERENCES customers(customers_id),
FOREIGN KEY(paintings_id) references pantings(painting_id)
);
완료. 맞춤법 오류 xD – user4316215