SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER trigger [dbo].[checkExamNo] on [dbo].[student]
for insert,update as
if exists(select examNo from student where isnull(examNo ,'')<>'' group by examNo having count(*)>1 )
rollback
可为NULL 但不能重复的SQL约束
最新推荐文章于 2023-05-20 11:42:44 发布