December 21, 2009 at 7:21 pm
Hi Everybody,
One interviewer asked me this question.
Where cannot we use "default"? What is that column?
Any idea?
Advance thanks.
December 21, 2009 at 7:30 pm
a default sets the value of the column, so common sense would make you think of columns that cannot have the same value more than once.
i'd test it to be sure, but off hand i'm thinking columns more than once would be:
a column with identity,
a primary key,
one that has a unique constraint;
columns that the default would conflict with an other constraint.
can you think of any other situations?
Lowell
December 21, 2009 at 8:46 pm
Hi Lowell,
Thank you very much for your answer. Nice reply.
December 24, 2009 at 11:27 am
it maybe useful to u -- http://www.blackwasp.co.uk/SQLDefaultColumns.aspx
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply