tags:

views:

46

answers:

3

how to get bottoms 3 record on msaccess

+3  A: 

MS Access (note the spelling) uses SQL, therefore you can use:

SELECT TOP 3 * FROM [tablename] ORDER BY [columnName] DESC
ck
Just to pick a nit... There are many versions of "SQL". I believe that the TOP keyword is specific to Transact-SQL (T-SQL). I think that Access uses Jet SQL, although I don't use Access much so I could be wrong there.
Tom H.
thanks a lot my problem is resolved
`TOP` is a keyword in T-SQL and Jet SQL.
Reuben Peeris
A: 

if you have an 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
Tolgahan Albayrak
A: 

thanks a lot my problem is resolved