I have a MySQL database and users access it through an old legacy software (OLS) the company bought years ago. OLS connects to MySQL through MySQL ODBC driver. There is no way to change OLS in recent future. The OLS is really slow when browsing records, so the idea is to provide OLS with records in the order users expect them i.e. the last created record, first. I have an auto incremental field, so when I order by desc the records, I get what I need. The problem is that OLS does not allow to manipulate query: the only thing it does is to ask for the whole table (I suppose it internally uses the query "SELECT * FROM xyz;
").
I learned here that in SQL there is no "predefined" order if there is no order by clause.
So my question is: how can I tell MySQL "if you get a SELECT
statement without ORDER BY
clause, then ORDER
the table desc using Auto ID field"?
If I can not force MySQL, but I have to act on the ODBC driver, that's is still ok for me.
Oh, by the way, sorry for any error i could have had, is my first question and I tried to stick to the rules.
ORDER BY
!select * from <underlyingtable> order by <column>
?