Page 236 - IT2
P. 236
ALTER TABLE [dbo].[EMETTRE] CHECK CONSTRAINT
[FK_EMETTRE_EMETTRE2_SATELLIT]
2) Requête permettant d’ajouter la contrainte d’intégrité référentielle reliant la table
« Chaine » à la table « Pays »
Alter table Chaine
ADD FOREIGN KEY (Code-Pays) REFERENCES Pays(Code_Pays)
3) Requêtes (TRANSACT SQL)
a)
select C.*
from chaine C, emettre E, satellite S
where C.code_chaine = E.code_chaine
and E.code_satellite = S.code_satellite
and S.nom_satellite='HOTBIRD'
b)
select nom_satellite, count(*)
from satellite S, emettre E
where S.code_satellite = E.code_satellite
group by nom_satellite
c)
select *
from chaine
where datediff(day, date_lancement, getdate())<15
d)
select nom_pays
from pays P, chaine C
where P.code_pays = C.code_pays
group by nom_pays
having count(*) >= all (select count(*)
from chaine
group by code_pays)
Dossier 4 : Questions (6 pts)
Voir Guides de Soutien de la filière TDI.
www.itlearning-settat.com
Email: admission@itlearning-settat.com
Tél.:0661077812

