[ 
https://issues.apache.org/jira/browse/DERBY-6408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13905872#comment-13905872
 ] 

Mike Matrigali commented on DERBY-6408:
---------------------------------------

10.6, 10.5 and 10.2 all get the following syntax issue.  Goting to assume some 
10.7 change introduced the behavior change.  Seems like both behaviors are 
wrong, so not marking it as a regression for now,
but would be open if anyone has a different opinion.

ij version 10.6
CONNECTION0* -  jdbc:derby:wombat
* = current connection
ij> create table t(x int);
0 rows inserted/updated/deleted
ij> values exists(select * from t);
ERROR 42X80: VALUES clause must contain at least one element. Empty elements 
are not allowed.


> EXISTS returns NULL instead of FALSE
> ------------------------------------
>
>                 Key: DERBY-6408
>                 URL: https://issues.apache.org/jira/browse/DERBY-6408
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.3.3, 10.9.2.2, 10.10.1.1
>            Reporter: Knut Anders Hatlen
>
> The reference manual topic on Boolean expressions - 
> http://db.apache.org/derby/docs/10.10/ref/rrefsqlj23075.html - says that 
> EXISTS should return FALSE if the subquery returns no rows. In reality, it 
> returns NULL:
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> values exists(select * from t);
> 1    
> -----
> NULL 
> 1 row selected
> SQL:2011, part 2, 8.10 <exists predicate> also says that FALSE is the correct 
> result if the cardinality is 0.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to