Documente Academic
Documente Profesional
Documente Cultură
Eeee
Eeee
int
AS
begin
if not Exists (Select Cod_client from Clienti where
cod_client=@cod_client)
select'nu exista clientul'
else
begin
if not Exists (Select Cod from Produse where
cod=@cod_produs)
select 'nu exista produsul'
else
begin
if not Exists (select cantitate from Produse where
Cantitate=@cantitate )
select'nu exista cantitatea ceruta'
else
begin
insert into Comenzi(Cod_client,Cod_produs,Cantitate)
values(@cod_client,@cod_produs,@cantitate)
end
end
end
end