You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2018/02/26 12:31:00 UTC
[jira] [Updated] (DERBY-6983) Support SELECT * for IN predicate
subqueries when it is "obvious" that the asterisk expands to exactly one
column
[ https://issues.apache.org/jira/browse/DERBY-6983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-6983:
---------------------------------
Urgency: Normal
Bug behavior facts: Deviation from standard,Seen in production
Issue & fix info: Workaround attached
> Support SELECT * for IN predicate subqueries when it is "obvious" that the asterisk expands to exactly one column
> -----------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6983
> URL: https://issues.apache.org/jira/browse/DERBY-6983
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.14.1.0
> Reporter: Lukas Eder
> Priority: Major
>
> The following query is not allowed in Derby:
> {code:java}
> SELECT *
> FROM sys.systables
> WHERE tablename IN (
> SELECT *
> FROM (
> SELECT 'SYSTABLES' t
> FROM sysibm.sysdummy1
> ) t
> ){code}
> The error I'm getting is:
> {code:java}
> 'SELECT *' only allowed in EXISTS and NOT EXISTS subqueries.{code}
> In this case, it is "obvious" that the asterisk (also a qualified asterisk: t.*) expands to exactly one column and the query should be perfectly fine. I'm not aware of any other databases with such a restriction.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)