1. CAMPOS CALCULADOS
CREATEDATABASE Tienda
USE Tienda
createtable articulo(
cod_pro nvarchar(10)notnull,
nombre_pro nvarchar(20)notnull,
costo_pro numeric(18,0)notnull,
precio_pro numeric(18,0)notnull,
stock_pro smallint
)
select*from articulo
select stock_pro,costo_pro,stock_pro*costo_pro as valor_total from
articulo
select nombre_pro,costo_pro,precio_pro,stock_pro,costo_pro*stock_pro as
valorizado from articulo
select nombre_pro,costo_pro,precio_pro,stock_pro,costo_pro*stock_pro as
SVP from articulo
select nombre_pro,costo_pro,precio_pro,stock_pro,(precio_pro-
costo_pro)*stock_pro as UTILIDADES from articulo
select nombre_pro,costo_pro,precio_pro,stock_pro,costo_pro*stock_pro as
SVC,precio_pro*stock_pro as SVP,(precio_pro-costo_pro)*stock_pro as
UTILIDADES from articulo
select nombre_pro,precio_pro,(precio_pro*20)/100 AS DESCUENTO from
articulo
select nombre_pro,precio_pro,precio_pro-(precio_pro*20)/100 AS PPUBLICO
from articulo
select nombre_pro,precio_pro,(precio_pro*20)/100 AS DESCUENTO,precio_pro-
(precio_pro*20/100)AS PPUBLICO from articulo