Retrieving the latest entries

How do I get the last 3 entries?

0


a source to share


2 answers


MS Access (pay attention to the spelling) uses SQL, so you can use:



SELECT TOP 3 * FROM [tablename] ORDER BY [columnName] DESC

      

+5


a source


if you have autonumber field as IID on your table then



select * from  (select *, (select COUNT(0)  from tableName 
where IID >= thisIsTempNameNotChange.IID)
as INDEX from [tableName] thisIsTempNameNotChange) WHERE INDEX<=3

      

0


a source







All Articles