+ 2
how to retrieve last 5 records from table??
2 Réponses
+ 5
select top 5 * from mytable order by 1 desc (or any increment or any unique data column if u have primary key with increment use it in order by )
it will work . SQL will first order the record in descending manner and top 5 will retrieve top 5 records(for you last 5) I hope this satisfy
+ 1
otherwise rank the data.. sort it in descending order and then take top5