I have this db with lots of tables and frequently I have to an开发者_JAVA技巧swer the question: Why is entry x not being shown?
Often I have an idea which entry might be the reason, but more often its wild guessing and trying.
This gets boring after some time. Is there a tool out there where I enter the joins and the key of the entry that I want to have and the tool tells me: This entry stops to have joins in table x.
Another suggestion is to change the JOIN (which is INNER by default) to a LEFT JOIN one-by-one.
Make a new select statement and change INNER JOINs to OUTER JOINs and add 'where id=foo' to pick out the object you are interested in. Look for NULLs in the result.
Just include a column from every join in the query. The first column that is NULL will be the first join that fails.
精彩评论