Home Forums SQL Server 2005 SQL Server 2005 General Discussion Can I use a case statement in a column default? RE: Can I use a case statement in a column default?
Steve Jones - SSC Editor
SSC Guru
Points: 734498
More actions
August 1, 2011 at 12:59 pm
#1361791
The default isn't an expression run against the row. It's a value. Same for computed columns, these don't allow logical expressions.
A trigger is the best way to handle this.