The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
107 views

Does adding a foreign key constraint in MySQL cause a table rebuild?

I need to alter a large table in order to add a foreign key. Does adding the constraint cause the table to be rebuilt? The referenced table already exists and has an index on the column.
5
votes
3answers
82 views

Discover intended Foreign Keys from JOINS in scripts

I'm inheriting a database that has 400 tables and only 150 foreign key constraints registered. Knowing what I do about the application and looking at the table columns, it's easy to say that there ...
0
votes
2answers
744 views

Cannot drop index from MySQL INNODB table with foreign keys/references

I'm about to drop an index from a mySQL INNODB table. There are references defined already. When I try to alter it, it says: 1025 - Error on rename of 'X/#sql-2a5f_219828' to 'X' (errno: 150) ...
1
vote
1answer
235 views

how to find foreign keys constraints?

I have a table called abs with primary key absId, this is used as a foreign key in couple of tables which I don't know. Is there a way that I can find out how find the names of those tables in which ...
2
votes
1answer
456 views

Can I use the export/import data in SQL 2008 with FK constrained tables?

For sending data back and forth between tables having identical schema I have used the import/export task in management studio. The problem is that SQLServer seems to do the import/export ops in ...
2
votes
2answers
11k views

How to delete a record when two tables have foreign key referenced to each other? [closed]

Delete any record of them will report an error like this: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails How to overcome this problem?
2
votes
2answers
273 views

Visualizing InnoDB's Foreign Keys

What would be the best way to get a visual representation of a group of MySQL tables' foreign key constraints? (other than drawing them out by hand) Something like this: