How can I optimize this dynamic SQL query in oracle with PL/SQL?

I need some Help in Oracle SQl Query?

  • Can we use 2 "DISTINCT" expressions in the same line.. in oracle sql which gives a proper distinct output?? example SELECT DISTINCT manager_id,first_name FROM employees

  • Answer:

    What is a proper distinct output ? The DISTINCT output applies to the complete output, i.e. all columns selected. Of course it applies to the combination of those columns. The purpose of DISTINCT is to remove duplicates from the results of a SELECT. In your example: SELECT DISTINCT manager_id,first_name FROM employees The DISTINCT applies to all columns. It always does.

Priyanka at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

don't think so.

Jim

Try SELECT DISTINCT (manager_id, first_name) FROM employees

TheMadProfessor

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.