I have a table created like this originally:
CREATE TABLE dbo.XX (
YY int DEFAULT(NULL)
)
If you do this, and then script the table later on, you will get the following code, plus a randomly named default constraint:
CREATE TABLE [dbo].XX([YY] [int] NULL)
GO
ALTER TABLE [dbo].XX ADD DEFAULT (NULL) FOR [YY]
GO
Now is there any real point in specifying DEFAULT (NULL) on a column instead of just leaving it as [YY] [int] NULL in the first place?
NULLon a column instead of just leaving it as[yy] [INTEGER]in the first place?