At 09:19 PM 6/22/2007, you wrote:
when you get a duplicate key error it says something to the effect of "Duplicate entry 'xyz' for key x"
What I want to know is how to find out what table fields are part of key x?

--

Chris,
You probably want to know the specific table, so I wonder if it shows up in the MySQL error logs? Of course you can dump the database structure and look for key "x" by doing:

mysqldump --no-data --skip-opt --skip-comments --compact

and redirect it out to a text file. Hopefully it only shows up in one table. I always trap my SQL errors and write them out to my own log so I know exactly what operation is failing, including the SQL that caused it. I use a compiled language so it's easy enough to trap exceptions.

Mike
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to