Back to Basics – What is the Difference between Selection and Projection?

These concepts are related to the sql statement in oracle and in RDBMS in general.


This is a vertical subset of table columns (the select list) , including all rows.
It may include one column, two columns or all table columns.
Projection answers the question: which columns the query shall return?

For example:
select empno , ename, job from emp;


This is a horizontal subset of table columns (some rows) , including all columns.
It may include one row, two rows or all table rows.
Selection answers the question: which rows the query shall return (the where condition)?

For example:
select * from emp where deptno = 10;

Usually, one query contains both: selection and projection:
select empno , ename , job from emp where deptno=10;



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s