Walter Meester
HoogkarspelNetherlands
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi David,
>Sorry, I wasn't reading the point of your message correctly last night.
>Yes, the join would cause multiple rows in the result if the child table had multiple rows, adding DISTINCT would prevent that from occuring.
But would mean overhead which can be quite significant in large 'intermediate JOIN resultsets' because the SQL statement has to filter out duplicates. Also, this can get real complicated as there might be additional JOINS in the statement or additional IN, NOT IN, EXISTS or NOT EXISTS clauses.
I know I don't use EXISTS much, but there are definately are situations where an EXISTS is better than a JOIN solution.
Walter,
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only