How do I create a table in SQL server with the default DateTime as empty, not 1900-01-01 00:00:00.000 that I get?
I mean, if there is no value inserted, the default value should be null, empty, etc.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the table definition, make this
datetimecolumn allows null, be not definingNOT NULL:Then , just insert
NULLin this column:Or, you can make use of the DEFAULT constaints:
Then you can ignore it completely in the
INSERTstatement and it will be inserted withe theNULLvalue: