selecting last inserted or updated record from Access table .

Hello ..
I want by using sql statement to select last iserted or updated record from Access table .
Any Idea ?
yazan3000Asked:
Who is Participating?
 
isilverConnect With a Mentor Commented:
This works the best if you have a autonumber with the database.  The line is listed below

select * from [table] where [autonumber field] in (select max([autonumber field]) from [table])

[table] - The talble of the record you want to look up.
[autonumber field] - The field that contains the autonumber.  The reason I say to use the autonumber is because the last record that you add will be the largest number.
0
 
ravi_raj123Commented:
isilver, your comment gives the last inserted record, but how to get last updated record???
0
 
yazan3000Author Commented:
Thank's isilver
do you have any idea about last updated record ?
0
All Courses

From novice to tech pro — start learning today.