If you're in Java you can call getMetaData on the ResultSet, and then call methods on
that (ResultSetMetaData) to determine number of columns, and type of each column.
This avoids the steps of creating/deleting a temp table.
What language are you using?
From: Will Standley [EMAIL
yes -- you need to create indexes on foreign key colums.
it would be better if one of the following 2 things happened instead.
1. foreign key creation failed if no index existed.
2. indexes were created automatically
it's more dangerous than actually not having foreign keys as it stands since
How's your application written? i.e. J2EE?
We've managed to put a layer in between the application and MySql that translates
subselects on the fly into inner joins.
This allowed us to quite painlessly move from MS SQL to MySql.
EXISTS can be refactored into an inner join.
NOT EXISTS can be
we did something like this a while back.
i remember we AND'ed what you basically have now with a number of less than and
greater than expressions to box the circle that you describe in your statement.
this boxing of the area merely provided a way to quickly limit the number of rows
against