wise 提示插入重复键值
作者:互联网
提示键值重复
按下面语句修复,先执行第一段,如果问题仍在,再执行第二段。 第一段 if not exists(select 1 from syscolumns a join sysobjects b on a.id=b.id join syscomments c on a.cdefault=c.id join sysobjects d on c.id=d.id where b.name= 'icsale' and a.name= 'FConfirmFlag') alter table icsale add DEFAULT (0) FOR [FConfirmFlag] if not exists(select 1 from syscolumns a join sysobjects b on a.id=b.id join syscomments c on a.cdefault=c.id join sysobjects d on c.id=d.id where b.name= 'icsale' and a.name= 'FObtainRateWay') alter table icsale add DEFAULT (0) FOR [FObtainRateWay] 第二段 update IC_MaxNum set FFlag=1 where FTableName='icsale' update ICMaxNum set FMaxNum=(select max(finterid)+1 from ICSale) where FTableName='icsale'
标签:wise,name,插入,键值,icsale,join,where,id,sysobjects 来源: https://www.cnblogs.com/allen1991/p/16055094.html