Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • SQL
    • None

    Description

      The Distinct requirement can be removed if it is proved that the operation produces unique output.

      select distinct d.deptno /* PK */, e.empname
      from employee e, department d
      where e.empno = d.mgrno /*PK = FK*/
      

      Internal query after rewrite:

      select d.deptno, e.empname
      from employee e, department d
      where e.empno = d.mgrno
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ioana-delaney Ioana Delaney
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: