|
SQL != DDS.This is an excellent point. I've been bitten by this on more than one occasion, especially when the default order came very CLOSE to what I was expecting, just slightly different <grin>. ORDER BY is your friend, even if it is a bit tedious (personally, I wish there was an ORDER BY PRIMARY-KEY syntax, but I digress).
Always use an ORDER BY clause on select statements if you intend to
review the result in a particular order. SQL does not guarantee record
order otherwise. What you saw was due to how the query optimizer chose
to access records, based on the different join and where conditions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.