Hi,
If you look for the last entry of a given column, this may not be the latest date in case of a date column.
If you have any auto-incremented (Identity) column in your table then you can go like,
SELECT TOP 1 * FROM <table> ORDER BY <auto-incremented column> DESC
Or, if you have any auto-generated system date column (date & time of a row generated), then,
SELECT TOP 1 * FROM <table> ORDER BY <auto-generated System Date column> DESC
If these kind of supporting columns do not exist in your table, you still have a way of doing it as follows:
(You need to go for a temporary table)
CREATE TABLE <TmpTable> (IdentityCol Int Identity(1,1), YourCol1, YourCol2...)
then,
INSERT INTO <TmpTable> (YourCol1, YourCol2...) SELECT YourCol1, YourCol2... FROM <YourTable>
and then,
SELECT TOP 1 * FROM <TmpTable> ORDER BY IdentityCol DESC
Hope this assists.