CREATE TRIGGER 名1 ON 数据表
FOR INSERT
AS
if exists(select 1 from inserted tem where exists(select 1 from 数据表 where 物品代码=tem.物品代码 and 检测项目=tem.物品代码 and (小数位数<>tem.小数位数 or 整数位数<>tem.整数位数 or 规格下限>tem.规格下限 or 规格上限<tem.规格上限))) 
  rollback tran