Closed hawk7476 closed 2 years ago
As I import db file it shows.please tell me which db file should i select? SQL query:
CREATE TABLE admin ( admin_id int(10) NOT NULL AUTO_INCREMENT, first_name varchar(30) NOT NULL, last_name varchar(30) NOT NULL, email varchar(96) NOT NULL, PRIMARY KEY (admin_id), KEY ADMIN_EMAIL_FK (email), CONSTRAINT ADMIN_EMAIL_FK FOREIGN KEY (email) REFERENCES login_info (email) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=latin1 MySQL said: Documentation
admin
admin_id
first_name
last_name
email
ADMIN_EMAIL_FK
login_info
Use this file: swadesh - Lame Data Set (Schema Included).sql located under Database File directory. Try dropping the database, create a new database and import the sql file.
As I import db file it shows.please tell me which db file should i select? SQL query:
CREATE TABLE
admin
(admin_id
int(10) NOT NULL AUTO_INCREMENT,first_name
varchar(30) NOT NULL,last_name
varchar(30) NOT NULL,email
varchar(96) NOT NULL, PRIMARY KEY (admin_id
), KEYADMIN_EMAIL_FK
(email
), CONSTRAINTADMIN_EMAIL_FK
FOREIGN KEY (email
) REFERENCESlogin_info
(email
) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=latin1 MySQL said: Documentation1215 - Cannot add foreign key constraint