MySQL and Oracle also have a data dictionary table, there is a separate library called Information_schema, to see the foreign key of a table to look up from the dictionary table
such as MySQL query the foreign key of a table, you can query the following way
Use INFORMATION_SCHEMA;
Select Table_name,column_name,constraint_name,referenced_table_name,referenced_column_name from KEY_COLUMN_USAGE WHERE table_name = ' logistics_member_express ';
+--------------------------+-----------------+----------------------------+------------------------+----------- -------------+
| table_name | column_name | constraint_name | Referenced_table_name | Referenced_column_name |
+--------------------------+-----------------+----------------------------+------------------------+----------- -------------+
| logistics_member_express | ID | PRIMARY | NULL | NULL |
| logistics_member_express | express_user_id | Reflogistics_express_user6 | Logistics_express_user | ID |
+--------------------------+-----------------+----------------------------+------------------------+----------- -------------+
2 rows in Set (0.00 sec)
You can delete a foreign key if you don't want it:
ALTER TABLE logistics_member_express DROP FOREIGN KEY reflogistics_express_user6;
MySQL queries the foreign key of a table