When generating Insert code use defaults
If you create a table with a BIT column not nullable with a default value, and then you type insert, the autocomplete gives you null for the bit column. Example below. (I haven't looked at what happens with other data types/defaults.)
CREATE TABLE dbo.MyTable
(
Flag BIT NOT NULL CONSTRAINT DFMyTableFlag DEFAULT (0)
)
GO
INSERT INTO dbo.MyTable
(
Flag
)
VALUES
(NULL -- Flag - bit
)
Hi,
This feature has actually just been added to SQL Prompt, and will be included in the next release (10.6.11).
Thanks,
Owen
-
Michael commented
I'm running 10.6.11.19980 and this issue has definitely not been fixed. Other data types like varchar and int do not bring through the default values either.