SQL Server 2005. I have a table with ColumnA bit, ColumnB int
Can I add a default value to ColumnB so that ColumnB is 15 if ColumnA is 1 and ColumnB is 0 if ColumnA is 0?
I know I could do this with a trigger but I my boss is prejudice against triggers (he needs trigger sensitivity training).
if your ColumnB can only be 15 or zero, you can make it a computed column based on ColumnA. here is the code to add a new computed column: