Update: It's Time For A Raise!!! (I)

Who's at the bottom of the food chain?

SQL> select job from emp where sal = (select min(sal) from emp);

JOB	
---------
CLERK

Let's look at the CLERKs.

SQL>select ename,job,sal from emp where job="CLERK";
select ename,job,sal from emp where job="CLERK"
                                        *
ERROR at line 1:
ORA-00904: invalid column name

OOPS!!! Use Single Quotes for String Comparisons

SQL> select ename,job,sal from emp where job= 'CLERK';

ENAME	   JOB		    SAL
---------- --------- ----------
SMITH	   CLERK	    800
ADAMS	   CLERK	   1100
JAMES	   CLERK	    950
MILLER	   CLERK	   1300


Bob Dugan bdugan@stonehill.edu