I want to see the referenced table of previously created table.
What I Have :
I have a table zone_inout_log
in DB trackcar
. It contains various fields. I want to see the references of all the foreign keys used in this table.I don't know the referenced tables. All I have is table zone_inout_log
in which foreign keys are used , columns those are the foreign keys user_id
, device_id
, area_id
etc.
What I Want
I want to see all the referenced tables like which table do I get user_id from and
device_id,
area_id` and so on.
What I Tried :
show table status from trackcar;
Also tried
show create table zone_inout_log;
| zone_inout_log | CREATE TABLE `zone_inout_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`device_id` int(11) NOT NULL,
`area_id` int(11) NOT NULL,
`lat` float(10,6) DEFAULT NULL,
`lng` float(10,6) DEFAULT NULL,
`date_time` datetime DEFAULT NULL,
`inout_status` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `device_id` (`device_id`),
KEY `area_id` (`area_id`),
KEY `lat` (`lat`),
KEY `lng` (`lng`),
KEY `date_time` (`date_time`),
KEY `inout_status` (`inout_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
But didn't get referenced table name . If someone can suggest something ?