Hi again

> b) retrieve the last record 
***************************
Assuming you have a column x which imposes the order you're after: 

SELECT MAX(x) FROM t 

to get the max key 

SELECT * FROM t WHERE x=<max key> 
**************************
I have a primary key comprising first two columns Date and Hours e.g.
01-01-2009, 6

And so what do I change the above code suggestion to ?

Bob M 



--
View this message in context: 
http://apache-database.10148.n7.nabble.com/Retrieving-newest-record-from-derby-table-tp134908.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Reply via email to