Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Databases
»
JDBC and Relational Databases
Search for last record and display contents
Annemarie McKeown
,
Ranch Hand
Mar 05, 2004 12:55:00
(0 cow)
(0 skulls)
+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.
James Swan
,
Ranch Hand
Mar 05, 2004 13:51:00
(0 cow)
(0 skulls)
+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)
Annemarie McKeown
,
Ranch Hand
Mar 06, 2004 09:55:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Thanks James, worked out fine.
Post by:
autobot
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
.