Find the value of the latest date

Database

Find the value of the latest date

Hi, I have to get the value for the latest date..Say I have ID and Event Date fields. I need to get the ID of the latest "Event Date". I know latest date could be achieved by using MAX, I would like to know how we can do the same without aggregate function?

2 REPLIES

Re: Find the value of the latest date

Then you can go with Rank() or Row_number() functions to achieve this.

Regards,

Mohan K

HP
N/A

Re: Find the value of the latest date

how about

select top 1 Event_Date from table

cheers

HP