Basic SQL
Basic SQL
Background
Parts of SQL
Basic Structure
Set Operations
Aggregate Functions
Background
Parts of SQL
Relations using in
Examples
Basic Structure
Basic structure of SQL includes three clauses: select, from
and where.
select
select projection in RA
select without elimination of duplicates
Find the names of all branches in the loan
relation.
select branch-name select all branch-name
from loan
from loan
select with elimination of duplicates
select distinct branch-name
from loan
select
where
from
from
SQL uses relation-name.attribute-name,
Rename
Tuple Variables
Tuple Variables
String Operations
String Operations
Set Operations
Union
Intersect
Except
Aggregation Functions
avg
group by
having
The End