Comments
1 comment
-
Hi @Sushi21
I did some testing myself on 10.11.11 and this appears to be the intended way the feature works when using the default values. I used your script as a basis and I set up a few other default values on the columns, and you'll notice they all pull through as default, not just the datetime field:
However, if I change the CreatedDate column to remove the default value and instead add NOT NULL, then it generates GETDATE() in the values section:
Depending on what way you choose to do it, it doesn't matter too much, as the GETDATE() value will be used when inserting.
Hope that helps.
Add comment
Please sign in to leave a comment.
I'm constantly getting into this annoying issue where my insert script generated by SQL prompt always write DEFAULT instead of the actual default being GetDate().
Some forums posts seems to tell that the GetDate() one should work
Sql prompt version : 10.11.9
Insert script produced