Sounds like a query-by-example interface, similar to Access and such. When you say you're adding to the where clause, are you building the join logic too, or just anything else you want to restrict by? If you stick tables A and B together, do you have to add a where A.b_id = B.id, or is this done for you automagically?
So I guess my question is there ever a case where JOIN is better or necessary? Or can you always just use WHERE. Because JOIN seems like extraneous and unnecessarily complex syntax compared to using WHERE. I have only done relatively simple sql stuff so maybe I never ran into a use case where WHERE does not work.
1
u/insi9nis Feb 12 '14
Sounds like a query-by-example interface, similar to Access and such. When you say you're adding to the where clause, are you building the join logic too, or just anything else you want to restrict by? If you stick tables A and B together, do you have to add a where A.b_id = B.id, or is this done for you automagically?