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约束
最新推荐文章于 2024-08-24 22:44:48 发布