Useful mysql cmds they dont teach in class

show create table shows the code used to create the table, especially useful since I cant, for the life of me find a GUI in phpmyadmin to input/check foreign key constraints. The output will look something like this.

CREATE TABLE `attendance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`eid` int(11) NOT NULL,
`sid` int(11) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`),
KEY `eid` (`eid`),
KEY `sid` (`sid`),

CONSTRAINT `attendance_ibfk_1` FOREIGN KEY (`eid`) REFERENCES `events` (`id`) ON DELETE CASCADE,

CONSTRAINT `attendance_ibfk_2` FOREIGN KEY (`sid`) REFERENCES `scouts` (`id`) ON DELETE CASCADE

) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8

More importantly, you require the autogenerated constraint name attendance_ibfk_{12} in this case to remove foreign key constraints. Trying to delete columns without first removing the constraints will throw an error.

To remove constraints

ALTER TABLE attendance DROP FOREIGN KEY attendance_ibfk_1