db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob M <rgmatth...@orcon.net.nz>
Subject Retrieving the 'oldest' record and deleting it
Date Mon, 21 Oct 2013 18:53:32 GMT
Hi

I have the following code which retrieves the 'oldest' record and prints out 
some data

rs = s.executeQuery("SELECT from tablename ORDER BY Date ASC, Time, ASC
FETCH FIRST ROW ONLY");
rs.next();
String Date = rs.getString("Date");
String Date = rs.getString("Time");
myConsole.getOut().println("Date/Time " + Date ", " + Time);

Now I wish to delete this record and the code is..........

rs = s.executeQuery("DELETE from tablename WHERE ????");

What is the ?????

Bob M



--
View this message in context: http://apache-database.10148.n7.nabble.com/Retrieving-the-oldest-record-and-deleting-it-tp134915.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Mime
View raw message