Posted by MC on 10/29/86 11:31
You need to add time column to the table. Then you can select the
max(column) and use it to find the 'latest' column.
something like
select col1, col2, col3
from table
where AddTime = (select max(AddTime ) from table)
Offcourse, you need to think about this.Can there bi more then one 'latest'?
If someone updates the column, does it make 'latest' (if yes try using
timestamp). And so on.
MC
"Eugene Anthony" <solomon_13000@yahoo.com> wrote in message
news:DpIbf.3$r_5.1202@news.uswest.net...
> Lets say I have 1000 records stored in my database. Now I insert a new
> record into my database, how do I retrieve the lastest record from my
> database using a simple SQL statement.
>
> Eugene Anthony
>
> *** Sent via Developersdex http://www.developersdex.com ***
[Back to original message]
|