Pair Wise & Non-Pair Wise Columns

What are Pair Wise & Non-Pair Wise Columns?

Questions by gvmahesh   answers by gvmahesh

Showing Answers 1 - 3 of 3 Answers

Vinod Tuteja

  • Jun 6th, 2013
 

NON PAIRWISE COMPARISON SUBQUERY:

Code
  1. SELECT employee_id, manager_id, department_id

  2.   FROM employees

  3.  WHERE manager_id IN

  4.             (SELECT manager_id

  5.                FROM employees

  6.               WHERE first_name = John)

  7.    AND department_id IN

  8.             (SELECT department_id

  9.                FROM employees

  10.               WHERE first_name = John)

  11.    AND first_name != John;



PAIRWISE COMPARISON SUBQUERY:
Code
  1. SELECT employee_id, manager_id, department_id

  2.   FROM employees

  3.  WHERE (manager_id, department_id) IN

  4.               (SELECT manager_id, department_id

  5.                  FROM employees

  6.                 WHERE first_name = John)

  7.    AND first_name != John;

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions