Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6983

Support SELECT * for IN predicate subqueries when it is "obvious" that the asterisk expands to exactly one column

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.14.1.0
    • None
    • SQL
    • None
    • Normal
    • Workaround attached
    • Deviation from standard, Seen in production

    Description

      The following query is not allowed in Derby:

      SELECT *
      FROM sys.systables
      WHERE tablename IN (
        SELECT *
        FROM (
          SELECT 'SYSTABLES' t
          FROM sysibm.sysdummy1
        ) t
      )

      The error I'm getting is:

      'SELECT *' only allowed in EXISTS and NOT EXISTS subqueries.

      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.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            lukas.eder Lukas Eder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: