Hi all,
I am into writing a script for referential integrity check for mysql DB, but got stocked when I was unable to query all the Foreign keys in the DB. I will greatly appreciate if some good Samaritan can help me formulate a select query to show all foreign keys in the DB. is it even possible:rolleyes:
Many thanks in advance,
Eric
How to select all Foreign keys in a database
Started by eracha, Mar 04 2008 12:28 PM
8 replies to this topic
#1
Posted 04 March 2008 - 12:28 PM
|
|
|
#2
Posted 05 March 2008 - 11:43 AM
I believe this document will help you with MySQL metadata.
#3
Posted 27 June 2008 - 07:33 AM
Hey,
please take a look at this:
http: // sqlserver2000.databases.aspfaq.com/schema-how-do-i-find-all-the-foreign-keys-in-a-database [dot] html (sorry i cant post links :O :D )
This has a bit more than you think you need (bit will probably need to accomplish your task).
regards, Kris
please take a look at this:
http: // sqlserver2000.databases.aspfaq.com/schema-how-do-i-find-all-the-foreign-keys-in-a-database [dot] html (sorry i cant post links :O :D )
This has a bit more than you think you need (bit will probably need to accomplish your task).
regards, Kris
#4
Posted 30 October 2008 - 09:37 PM
foreign keys? not sure i understand. but if you want to get all the "child" keys..you can use "IN" or "EXISTS" in your SQL.
you can also use MINUS.
you can also use MINUS.
Edited by WingedPanther, 31 October 2008 - 04:39 AM.
Double post
#5
Posted 31 October 2008 - 04:41 AM
shokosugi: foreign keys are a standard database term. Also, if a question has already been answered 4 months ago, why are you responding?
#7
Posted 31 October 2008 - 12:54 PM
This thread is very evil.
Attached Files
#8
Posted 31 October 2008 - 12:56 PM
nullbyte said:
This thread is very evil.


Sign In
Create Account

Back to top











