Triggers vs Check Constraints?


Author
Message
William Fields
William Fields
StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)
Group: StrataFrame Users
Posts: 80, Visits: 239
Hello,

I'm working through updating our code to remove triggers and replace them with declarative R.I. rules.

I've also got a fair amount of trigger code that checks for empty field values (on not null fields), so I'm looking into check constraints as a replacement. But, I don't know if this is the right choice, or if the DDT supports check constraints other than default value constraints.

Here's a link describing how to set up a check constraint to prevent blank field values:

http://stackoverflow.com/questions/5489648/how-to-constraint-no-empty-strings-on-an-nvarchar-column

Can anyone chime in about pro's and con's of this approach, and where check constraints can be defined in the DDT for not allowing empty string field values?

Thanks.

Bill
Edited 11 Years Ago by William Fields
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search