--goods2商品2基本表
create table goods2
(
gno char(8) primary key,                                             --商品编号(主键)
gkno char(8) not null,                                                --商品种类编号(外键)
gpdate datetime not null,                                            --生产日期
guarantee char(20) not null                                          --保质期
)--Sale 购买基本表
create table sale
(
cno char(8) not null,                                                         --流水号(外键)
cmemberno char(8),                                                            --会员编号(外键)
gno char(8) not null foreign key (gno) references goods2(gno),                --商品编号(外键)
price numeric(7,2),       --实际价格
sdate char(20) not null,                                                      --购买日期
sno char(6) not null                                        ,                 --员工编号(外键)
primary key(cno,gno)                                                          --主键(流水号,商品编号)
)--写触发器(当销售了商品是,删除库存中相应的商品)
create trigger sale_goods
on sale for insert
as
  declare @g char (8)
select @g=gno from inserted
delete from goods2 where gno=@ginsert into goods2(gno,gkno,gpdate,guarantee)
values('10000001','00000001','2008-2-10','2013-2-10')
insert into sale(cno,cmemberno,gno,sdate,sno)
values('000002',null,'10000001','2008-5-20','1002')显示错误
服务器: 消息 547,级别 16,状态 1,过程 sale_goods,行 7
DELETE 语句与 COLUMN REFERENCE 约束 'FK__sale__gno__182C9B23' 冲突。该冲突发生于数据库 'test',表 'sale', column 'gno'。
语句已终止。
请各位帮我看下