Hi, what is the best way for this SQL?
In Model "A" I only have one SQL that works and solves the problem, and model "B" I have two SQL's, that do the same thing as the "A" model but more readable.
What would be the most appropriate model to use?
Of course that's a subjective choice but I'd suggest B) because it's more comprehensible.
Note however, that both models are not truly semantically equivalent because the contents of tableName could change between the first and second statement of B) - e.g. by different connections. In contrast, model A) uses one atomic statement.
answered 19 Jan '11, 17:09