New to mysql and have been told by many, that creating foreign keys in mysql is not necessary? how will table relationships be consistent and cascading would be done then? Where can i find info about what foreign key has been created on my mysql tables? desc table_name or show create table_name is not giving any info….
Share
Foreign keys in MySQL work only with InnoDB tables. They do appear in
SHOW CREATE TABLE. You might not actually have foreign keys defined, because MySQL silently ignores thecolumn type REFERENCES othertable(column)syntax; only separateFOREIGN KEY (column) REFERENCES othertable(column)foreign key definitions have effect inCREATE TABLE.Related reading: CREATE TABLE in MySQL docs (search for “inline references specifications”)