YouaremodifyingatablenamedProductinaSQLServer2005database.YouwanttoaddanewcolumnnamedFriendlyNametotheProducttable.Afriendlynameforeachproductwillbestoredinthiscolumn.Thetablecurrentlycontainsdata.The salesdepartmenthasnotyetcreatedafriendlynameforeachpro

题目

YouaremodifyingatablenamedProductinaSQLServer2005database.YouwanttoaddanewcolumnnamedFriendlyNametotheProducttable.Afriendlynameforeachproductwillbestoredinthiscolumn.Thetablecurrentlycontainsdata.The salesdepartmenthasnotyetcreatedafriendlynameforeachproduct.FriendlyNameisarequiredvalueforeachproduct.Youwanttoaddthisnewcolumnbyusingtheleastamountofeffort.Whatshouldyoudo?()

A.DefinethenewcolumnasNULL.UpdatetheFriendlyNamecolumntothesamevalue astheproductNamecolumn.AltertheFriendlyNamecolumntobeNOTNULL.

B.DefinethenewcolumnasNOTNULLwithadefaultvalueof’Undefined.’

C.DefinethenewcolumnasNULL.Useapplicationlogictoenforcethedataconstraint.

D.DefinethenewcolumnasNULLwithadefaultvalueof’Undefined.’


相似考题
参考答案和解析
参考答案:B