/* premiers ordre Oracle */

create table piece (
    nom char(10), 
    prix real); 

insert into piece
values ('vis', 0.0);

insert into piece
values ('clou', 3.0);

commit;

select *
from piece;

select nom
from piece
where prix < 1.0;

update piece
set prix = prix + 3.0
where nom = 'vis';

delete piece
where nom = 'vis';

commit;

select nom
from piece
where nom like 'c%'
   or prix >= 2.0;

insert into piece
values ('ecrou', null);

select * 
from piece
where prix is null;

alter table piece
add (num integer); 

rename piece to catalogue;

create table cheap(name, price)
as select nom, prix
   from piece
   where age <= 4.0;

drop table piece;


