db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wouter (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4583) TRUE by itself is not accepted in WHERE
Date Mon, 15 Mar 2010 16:20:27 GMT

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

Wouter commented on DERBY-4583:
-------------------------------

Fair enough. But in this particular case Derby actually demands a boolean expression.

ij(CONNECTION1)> SELECT * FROM list WHERE 1;
ERROR 42X19: The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'INTEGER' expression.
 It must be a BOOLEAN expression.

Which is rather confusing if there is no support for booleans...

> TRUE by itself is not accepted in WHERE
> ---------------------------------------
>
>                 Key: DERBY-4583
>                 URL: https://issues.apache.org/jira/browse/DERBY-4583
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.3.0
>         Environment: n/a
>            Reporter: Wouter
>
> A SELECT query with a literal boolean value in its WHERE clause results in a syntax error.
> How to reproduce:
> CREATE TABLE list (value VARCHAR(10));
> Given this table, the following queries result in a syntax error.
> SELECT * FROM list WHERE TRUE;
> SELECT * FROM list WHERE FALSE;
> SELECT * FROM list WHERE value='A' OR TRUE;
> Why is TRUE/FALSE not a boolean expression?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message