16. Il linguaggio SQL Vers. 11.0 – Gennaio 2026
OPERATORE EQUI-JOIN ��( NOTA BENE: carattere Wingdings3)
Esempio query: Visualizzare i dati di tutti i dipendenti con i dati relativi ai loro rispettivi capi
Dipendente �� Dipendente CodCapo = CodDip
che, come è noto, risulta equivalente a σP( Dipendente X Dipendente) con P = { CodCapo = CodDip }
SELECT * FROM Dipendente AS Tab1, Dipendente AS Tab2 WHERE( Tab1. CodCapo = Tab2. CodDip);
OPPURE
�� SELF-JOIN
" PURO "
SELECT Tab1. Cognome, Tab1. Nome, Tab2. Cognome, Tab2. Nome FROM Dipendente AS Tab1 INNER JOIN Dipendente AS Tab2 ON Tab1. CodCapo = Tab2. CodDip;
RISULTATO QUERY
Autore: Rio Chierego( email: riochierego @ libero. it- sito web: www. riochierego. it) Pag. 31