I've searched for long time for getting last entered data in a table. But I got same answer.
SELECT TOP 1 CustomerName FROM Customers
ORDER BY CustomerID DESC;
My scenario is, how to get last data if that Customers table is having CustomerName
column only? No other columns such as ID
or createdDate
I entered four names in following order.
James
Arun
Suresh
Bryen
Now I want to select last entered CustomerName
, i.e., Bryen
. How can I get it..?