|
Re: sql query [message #1643 is a reply to message #1642] |
Fri, 17 May 2002 06:41 |
|
Mahesh Rajendran
Messages: 10707 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
SQL> /
Enter value for n: 1
old 2: where &n = (select count(distinct sal) from emp
new 2: where 1 = (select count(distinct sal) from emp
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7839 KING PRESIDENT 17-NOV-81 5000 10
SQL> /
Enter value for n: 8
old 2: where &n = (select count(distinct sal) from emp
new 2: where 8 = (select count(distinct sal) from emp
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7934 MILLER CLERK 7782 23-JAN-82 1300 10
|
|
|