SQL Aggregate Join
SQL Aggregate Join
SQL Aggregate Join
– INSERT
– UPDATE
– DELETE
– SELECT
Insert (using the enter key)
SELECT <columns>
FROM <tables>
WHERE <condition>
Where:
SELECT <columns>
FROM <tables>
WHERE <condition>
Example:
OR
SELECT *
"select all attributes"
FROM course
Example 2
Find the faculty number and name of each
faculty member in Computer Science with
the rank of “Assistant”
SELECT cnum
FROM section
WHERE dcode = ‘COMP’ and term = ‘X2’
SELECT * SELECT *
FROM faculty FROM faculty
WHERE salary < 40000 WHERE salary < 40000
ORDER BY salary ORDER BY salary DESC
A B F
C D -
Right Outer Join
A B A F
R= S=
C D G H
A B F
- G H
Full Outer Join
A B A F
R= S=
C D G H
A B F
C D -
- G H
Contd…