I'm trying to select the row from a table that has the maximum date. For example, lets say I want the name of the most recently created object in dba_objects. I can do this using a sub-query, but surely there must be an easier way, and querying this way doesn't account for the possibility of two things being created at the exact same time.
I would assume there must be some way of achieving the same result using the HAVING clause, but I can't figure it out right now (it is Monday morning after all).
Any ideas?
SELECT object_id, object_name, created
FROM dba_objects
WHERE created = (
SELECT MAX(created)
FROM dba_objects)
/