4. Selecting ROWS to display: Step 6

Demo

NULL fields

Rows which contain a NULL value (i.e. no data) in a column can be selected by testing for NULL. withthe IS NULL operator.

SQL

SELECT * FROM emp WHERE comm IS NULL;

Output

empno ename job mgr hiredate sal comm deptno
7566 JONES MANAGER 7839 1995-10-31 2975.00 20
7698 BLAKE MANAGER 7839 1992-06-11 2850.00 30
7782 CLARK MANAGER 7839 1993-05-14 2450.00 10
7788 SCOTT ANALYST 7566 1996-03-05 3000.00 20
7876 ADAMS CLERK 7788 1999-06-04 1100.00 20
7900 JAMES CLERK 7698 2000-06-23 950.00 30
7902 FORD ANALYST 7566 1997-12-05 3000.00 20
7934 MILLER CLERK 7782 2000-01-21 1300.00 10

Progress

Proceed to Next step