CREATE TABLE w1799670_STAFF ( w1799670_STAFF_id INT(4), w1799670_first_name VARCHAR(50) not null, w1799670_last_name VARCHAR(50) not null, w1799670_email VARCHAR(50) not null, w1799670_phone_number VARCHAR(15) not null, w1799670_hire_date TIMESTAMP not null, w1799670_salary DECIMAL(8,2) not null, w1799670_commission_pct DECIMAL(2,2), w1799670_job_id INT(3) not null, w1799670_branch_id VARCHAR(10) NOT NULL, constraint s_sid_pk PRIMARY KEY (w1799670_STAFF_id), constraint s_jid_fk FOREIGN KEY (w1799670_job_id) references w1799670_Job(w1799670_JOb_id), constraint s_bid_fk FOREIGN KEY (w1799670_branch_id) references w1799670_branch(w1799670_branch_id) );
#1215 - Cannot add foreign key constraint
https://stackoverflow.com/questions/65572689/mysql-1215-how-can-i-add-this-foreign-key-constraint January 05, 2021 at 11:05AM
没有评论:
发表评论