Ben,
This excellent script from Peter takes over a minute to run, and only
identified RI (Referential Integrity) to one level of nesting.
If I try to delete a record and get 'a foreign key constraint fails',
this returns instantly without any delay and to all nested levels of RI.
How does My
MySQL,
Another general comment, I'm interested in knowing
This excellent script from Peter takes over a minute to run, and only
identified RI (Referential Integrity) to one level of nesting.
If I try to delete a record and get 'a foreign key constraint fails',
this returns instantly with
MySQL,
Another general comment, I'm interested in knowing
This excellent script from Peter takes over a minute to run, and only
identified RI (Referential Integrity) to one level of nesting.
If I try to delete a record and get 'a foreign key constraint fails',
this returns instantly with
Peter,
I see... I was thinking 'db' might have been a system table name or
something...
This works perfectly, thanks.
Ben
Peter Brawley wrote:
Ben Clewett wrote:
Unfortunately I get:
mysql> SELECT
->
c.table_schema,u.table_name,u.column_name,u.referenced_column_name
-> FROM i
Ben Clewett wrote:
Unfortunately I get:
mysql> SELECT
->
c.table_schema,u.table_name,u.column_name,u.referenced_column_name
-> FROM information_schema.table_constraints AS c
-> INNER JOIN information_schema.key_column_usage AS u
-> USING( constraint_schema, constraint_name )
Unfortunately I get:
mysql> SELECT
-> c.table_schema,u.table_name,u.column_name,u.referenced_column_name
-> FROM information_schema.table_constraints AS c
-> INNER JOIN information_schema.key_column_usage AS u
-> USING( constraint_schema, constraint_name )
-> WHERE c.constrai
Ben,:
Dear MySQL,
Can you please tell me if there is a way of listing all child tables
which have a foreign key reference to a parent?
Find children of db.table:
SELECT
c.table_schema,u.table_name,u.column_name,u.referenced_column_name
FROM information_schema.table_constraints AS c
INNER JOI