GESCOM
GESCOM
desc nomTable;
___________________________________________________________________________________
____________________________________
1 -
select nomc from client;
2 -
select codecli,catc from client;
3 -
select * from client where catc=3;
4 -
select codecli from client
where vilc='Paris';
5 - select codecli from client where vilc='Paris' and catc>3;
6 - select numcom from detailcom where codeart='A400' and qtecomd>4;
7 - select codecli,nomc from client where catc>2;
8 - select * from article where prixvente>=(2*prixachat);
9 - select * from article where (couleur='rouge' and prixvente > (2*prixachat);
10- select * from article where couleur <> 'rouge' and prixvente > (2*prixachat);
11- select * from article where (couleur='rouge' and prixvente >=250) or
(couleur='bleu');
12- select * from article where prixachat Between 150 and 200;
13- select * from article where (couleur='bleu' or couleur='blanche' or
couleur='rouge'); !!!OU!!! where couleur in('bleu','rouge',...);
14- select * from article where (couleur <> 'rouge' and couleur <> 'bleu' and
couleur <> 'blanche');
45-
46- select * from article where prixvente > (select prixvente from article where
codeart = 'A100');
47- select * from article where prixachat > (select prixachat from article where
codeart = 'A600') order by p cxrixachat;
48- select * from article where couleur = (select couleur from article where
codeart = 'A100') and prixvente >= (select avg(prixvente) from article);
___________________________________________________________________________________
_______________________________________________________________
LES JOINTURES ;
afficher toute les commandes avec numcomm le nom de client et la date de commande
select numcom,nomc,datecom from client,commande where
(client.codecli=commande.codecli);
,
codeart varchar2(20),
qtecom number(20),