db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: Using a SELECT FROM command correctly
Date Wed, 09 Dec 2015 09:56:01 GMT
On 08/12/2015 16:40, Rick Hillegas wrote:
> Hi Bob,
>
> Have you tried adding the following WHERE clause to your query:
>
>    where ffff is not null

Another way (since you're using ORDER BY and then selecting only 1 row) 
is to use NULLS LAST:

   SELECT * xxxx ORDER BY ffff DESC NULLS LAST OFFSET 1 ROW FETCH NEXT 1 
ROW ONLY

-- 
John English

Mime
View raw message