Corrigé Exercices SQL PLUS oracle Exercices Oracle SQL

- Consulter la page de l'exercice.
- Solution des exercices


Correction Exercice 3




CREATE VIEW ATTRIBUTS AS
SELECT DISTINCT COLUMN_NAME, DATA_TYPE
FROM USER_TAB_COLUMNS ATTR, ALL_TABLES TABL WHERE ATTR.TABLE_NAME=TABL.TABLE_NAME
AND OWNER=’DUPONT’;

GRANT SELECT ON ATTRIBUTS TO PUBLIC;


Correction Exercice 4

1)    select * from vol;

2)    select plnom, plprenom, ville from pilote order by plnom, plprenom;

3)    select plnom, plprenom, salaire from pilote where salaire>20000;

4)    select avnum, avnom from avion where localisation='Paris';

5)     select avnum, avnom, capacite, localisation from avion a, pilote p where a.localisation=p.ville and plnom='Tanguy';

6)     select volnum, villedep, villearr, heuredep, heurearr, avnom, plnom from avion a, pilote p, vol v
where p.plnum=v.plnum and a.avnum=v.avnum and volnum=714;

7)     select plnom, plprenom, avnum from pilote p, vol v where v.plnum=p.plnum;

8)     select distinct a.avnum, avnom from avion a, vol v where a.avnum=v.avnum;

9)    select count(*) from vol;

10)  select avnom, sum(capacite) from avion group by avnom;

11)  select avg(heurearr-heuredep) from vol;



             

Article plus récent Article plus ancien

Leave a Reply

Telechargement