Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql show foreign keys

SELECT 
  TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
FROM
  INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
  REFERENCED_TABLE_SCHEMA = '<database>' AND
  REFERENCED_TABLE_NAME = '<table>';
Comment

mysql show foreign keys column

SELECT 
  TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
FROM
  INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
  REFERENCED_TABLE_SCHEMA = '<database>' AND
  REFERENCED_TABLE_NAME = '<table>' AND
  REFERENCED_COLUMN_NAME = '<column>';
Comment

PREVIOUS NEXT
Code Example
Sql :: sql server delete row 
Sql :: oracle alert log location 
Sql :: mysql get count of rows 
Sql :: sql headers delphi 
Sql :: add many column to sap iq table 
Sql :: check sql database table lock 
Sql :: drop procedure sql 
Sql :: copy from folders in sql server 
Sql :: dirinfo.name my snippets in stored procedure 
Sql :: Disabling foreign key checks while performing Sqlalchemy Upgrade 
Sql :: oracle scan source ddl 
Sql :: how to check even or odd in sql 
Sql :: rename table in mysql 
Sql :: get a list of table names and field names from SQL 
Sql :: mysql find non alphanumeric characters 
Sql :: rows to comma separated values in mssql 
Sql :: operadores en postgresql 
Sql :: mysql return if it contains 
Sql :: return sql query laravel 
Sql :: mysql find and replace 
Sql :: v$session table or view does not exist 
Sql :: LoadError: cannot load such file -- mysql2/2.7/mysql2 
Sql :: sql insert timestamp 
Sql :: python mysql search 
Sql :: MySql get primary keys of table 
Sql :: postgres first_value in gropby 
Sql :: SQLite order random 
Sql :: find wordpress version in database 
Sql :: mysql db size 
Sql :: oracle sessions_per_user limit 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =