Selection operation: The selection operation can be considered as row wise filtering. We can select specific rows using condition.
Syntax:
Select *
from <table-name>
Where condition
Example:
SQL> Select *
from student
Where sid=104;
Selection is also know as restrict, this operator yields values for all rows found in a table that satisfies given condition. Select can be used to list all of the row values or it can yield only those rows values that match a specific criteria. Select yields a horizontal subset of a table
Projection operation: The projection operation performs wise filtering. Specific columns are selected in projection operation.
Syntax:
Select Attribute1, Atribute2
from table-name;
If all the columns of the table are selected, then it cannot be considered as projection.
Example:
SQL> select name, dob
from student
0 comments :
Post a Comment
Note: only a member of this blog may post a comment.