Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql find foreign key references

SELECT
  TABLE_NAME,
  COLUMN_NAME,
  CONSTRAINT_NAME,   -- <<-- the one you want! 
  REFERENCED_TABLE_NAME,
  REFERENCED_COLUMN_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
  REFERENCED_TABLE_NAME = 'My_Table';
Comment

PREVIOUS NEXT
Code Example
Sql :: python mysql check if database exists 
Sql :: create table sql server auto increment primary key 
Sql :: oracle get nls settings 
Sql :: apex ORA-20999 
Sql :: How to disable foreign key checks ? 
Sql :: oracle sql truncate table 
Sql :: postgresql make each element in array distinct 
Sql :: sql delete records older than 1 day 
Sql :: get rows affected mysql python 
Sql :: oracle split string 
Sql :: oracle apex who is connected 
Sql :: uninstall mysql server ubuntu 
Sql :: dbms_output.put_line 
Sql :: mysql bigint max value 
Sql :: sql server count all tables rows 
Sql :: oracle stop 
Sql :: remove all records from table mysql 
Sql :: psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user 
Sql :: sql server 2008 first and last day of month 
Sql :: what is initial catalog in sql connection string 
Sql :: describe table query in postgresql 
Sql :: create mysql user on all hosts 
Sql :: adding indexing on a db model in mysql using sequelize 
Sql :: sql delete multiple conditions 
Sql :: sql ends with string 
Sql :: where date major today mysql 
Sql :: oracle sysdate - 1 month 
Sql :: how to create table in sql 
Sql :: mysql size of table 
Sql :: mysql procedures 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =