Forums Register Login

Search for last record and display contents

+Pie Number of slices to send: Send
How do you search for the last record entered in your table. What query would I use to do this?
Many thanks.
+Pie Number of slices to send: Send
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)
+Pie Number of slices to send: Send
Thanks James, worked out fine.
catch it before it slithers away! Oh wait, it's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 858 times.
Similar Threads
barry boone exam answers
determing # of rows in recordset
Lock implementation
Best way to keep track of record in JTable
[B&S] GUI Search
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:03:42.