In principle, you cannot do this.
I usually suggest adding a surrogate primary key with auto-incrememt and ORDER BY, which:
SELECT * FROM yourtable ORDER BY id DESC LIMIT 1
But in your question you write ...
changing the table structure to add the correct auto-detection is out of the question.
So, another nice option that I can think of is to use a simulated ROW_NUMBER using variables:
SELECT * FROM ( SELECT T1.*, @rownum := @rownum + 1 AS rn FROM yourtable T1, (SELECT @rownum := 0) T2 ) T3 ORDER BY rn DESC LIMIT 1
Please note that this has serious performance implications: it requires a full scan, and the results are not guaranteed to be returned in any particular order in the subquery - you can get them in sort order, but again you cannot - when you don't set the order in which the server can select any order that he likes. Now he is likely to choose the order they store on disk to do as little work as possible, but relying on this is unreasonable.
source share