Auto-generated values for columns in database
- by Jamal
Is it a good practice to initialize columns that we can know their values in database, for example identity columns of type unique identifier can have a default value (NEWID()), or columns that shows the record create date can have a default value (GETDATE()).
Should I go through all my tables and do this whereever I am sure that I won't need to assign the value manually and the Auto-generated value is correct.
I am also thinking about using linq-to-sql classes and setting the "Auto Generated Value" property of these columns to true.
Maybe this is what everybody already knows or maybe I am asking a question about a fundamental issue, if so please tell me.