25.12.2012 Views

Cours SGBD LAI2 - Institut supérieur d'informatique de Mahdia

Cours SGBD LAI2 - Institut supérieur d'informatique de Mahdia

Cours SGBD LAI2 - Institut supérieur d'informatique de Mahdia

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Les vues (2)<br />

� Création d'une vue : CREATE VIEW<br />

� La comman<strong>de</strong> CREATE VIEW permet <strong>de</strong> créer une vue<br />

en spécifiant le SELECT constituant la définition <strong>de</strong> la<br />

vue<br />

� Syntaxe<br />

create view nom [(col1, ...) ] as<br />

select col1, col2, ...<br />

from tab<br />

where prédicat<br />

[with check option]<br />

� La spécification <strong>de</strong>s noms <strong>de</strong> colonnes <strong>de</strong> la vue est<br />

facultative<br />

� Par défaut, les colonnes <strong>de</strong> la vue ont pour nom les<br />

noms <strong>de</strong>s colonnes résultat <strong>de</strong> SELECT<br />

Riadh HADJ M’TIR – 2011/2012 165

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!