Escolar Documentos
Profissional Documentos
Cultura Documentos
use IMPACT
select *from produto
select*
from produto
where not (qtd_prod > 350 or qtd_prod <250)
order by 4
select
nome_prod,
tipo_prod,
val_prod,
[Valor c/ Aumento] = val_prod+val_prod*0.07
from produto
where tipo_prod in ('eletrônicos','informática') /* clausula 'in' faz o trabalho de listar como
seria um between ou and, mas ele lista apenas o que você quer*/
order by 2
update produto
set val_prod = val_prod*1.12
where tipo_prod ='informática' and val_prod <650
select*from produto
commit tran
select*from produto
--ALTERAR A QUANTIDADE COM MAIS 53 COM TUDO QUE FOR MAIOR QUE 400--
begin tran
update produto
set qtd_prod = qtd_prod+53
where qtd_prod >= 400
--COMANDO DELETE--
begin tran
select*from produto
select*from produto
commit tran
CONSTRAINTS
select*from tipo_produto