If I have a table like
CREATE TABLE [FooTable](
[foo] [varchar](50) NOT NULL,
[foo_boo] [bit] NOT NULL DEFAULT ((0)),
[foo_date] [datetime] NOT NULL DEFAULT (getdate())
)
Is there any performance gain to include the defaults for an insert, like this
INSERT INTO [FooTable]
([foo],[foo_boo],[foo_date])
VALUES
('FooBar', 0, GETDATE())
Over letting the defaults do their thing
INSERT INTO [FooTable] ([foo])
VALUES ('FooCooYoo')
I assume it’s negligible, but was just wondering.
Thanks!
Nothing worth mentioning.
Additionally, in the spirit of DRY (Don’t Repeat Yourself) I’d also say that it is bad practice. 2 years on, you (or the person who succeeds you in the job) will be scratching your head wondering why changing the column’s default didn’t change the value inserted.