| Author |
Search for last record and display contents
|
Annemarie McKeown
Ranch Hand
Joined: Nov 07, 2003
Posts: 47
|
|
How do you search for the last record entered in your table. What query would I use to do this? Many thanks.
|
 |
James Swan
Ranch Hand
Joined: Jun 26, 2001
Posts: 403
|
|
If you have a table with a nice auto-incrementing primary key column defined as an integer etc, you could issue: select * from mytable where myprimarykey = (select max(myprimarykey) from mytable)
|
 |
Annemarie McKeown
Ranch Hand
Joined: Nov 07, 2003
Posts: 47
|
|
|
Thanks James, worked out fine.
|
 |
 |
|
|
subject: Search for last record and display contents
|
|
|