MySQL Error 150
I'm trying to create a script to normalize another table in MySQL. Below is what I have: USE hw7; SET foreign_key_checks = 0; DROP TABLE IF EXISTS airport_codes; DROP TABLE IF EXISTS airport_locations; DROP TABLE IF EXISTS airport_codenames; SET foreign_key_checks = 1; CREATE TABLE airport_codes( airport_code char(3) not null, airline_code char(2) not null, primary key (airport_code, airline_code) ); INSERT INTO airport_codes SELECT DISTINCT airport_code, airline_code FROM airport_airlines; CREATE TABLE airport_locations( airport_code char(3) not null, city varchar(20) not null, state char(2)