CREATE TRIGGER kc ON 商品信息
after INSERT
AS
declare @tm varchar(15)
if exists(select @tm=库存信息.条形码 from 库存信息,Inserted where 库存信息.条形码=inserted.条码)
begin
insert into 库存信息(条形码,商场库存,仓库库存) values(@tm,0,0)
end
这个错在哪里了呀
CREATE TRIGGER kc ON 商品信息
after INSERT
AS
declare @tm varchar(15)
select @tm=库存信息.条形码 from 库存信息,Inserted where 库存信息.条形码=inserted.条码
if @tem is not null
begin
insert into 库存信息(条形码,商场库存,仓库库存) values( ,0,0)
end