[
https://issues.apache.org/jira/browse/DERBY-6049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562333#comment-13562333
]
Mamta A. Satoor commented on DERBY-6049:
----------------------------------------
DB2 LUW supports tuples in IN clause but with the help of VALUES clause. An
example syntax is as follows
select * from t where ( a, b ) in ( VALUES ( 1, 2 ), ( 3, 4 ) )
This syntax used by DB2 LUW is supported by SQL Standard.
I tried the above SQL in Derby but got a syntax error for the , in ( a, b ).
Following work in Derby
VALUES by itself works in Derby
values (1,2), (3,4);
(values (1,2), (3,4));
insert into t1 (values (1,2), (3,4));
> Allow tuples in IN lists
> ------------------------
>
> Key: DERBY-6049
> URL: https://issues.apache.org/jira/browse/DERBY-6049
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.10.0.0
> Reporter: Rick Hillegas
>
> A user would like to be able to use tuples in IN lists. See
> http://apache-database.10148.n7.nabble.com/tuple-IN-clause-td126642.html. The
> following syntax (not currently supported by Derby) is legal according to my
> reading of the SQL Standard, part 2, sections 8.4 <in predicate> and 7.2 <row
> value expression>:
> select * from t where ( a, b ) in ( ( 1, 2 ), ( 3, 4 ) )
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira