USE [MyDb] GO IF NOT EXISTS(SELECT * FROM [MyDb].[dbo].[Product] WHERE Name='小浣熊干脆面') BEGIN INSERT [dbo].[Product]([Id],[Value],[Name],[Description],[ValueType],[IsDelete]) VALUES (N'D63D1882-FF39-455D-A583-2661574DA66E',N'true',N'小浣熊干脆面',N'好吃的干脆面',1,0) END
先判断数据是否已经存在,再插入,仅供参考