Lukas Eder created DERBY-6983:
---------------------------------

             Summary: 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


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)

Reply via email to