Bug Description
When creating a table without explicitly specifying NULL or NOT NULL for columns, DBCode appears to treat the columns as NOT NULL by default. This behavior differs from SQL Server-compatible engines (such as Fabric Warehouse), where columns allow NULL by default if not specified.
As a result, insert operations that should be valid fail with nullability errors.
Repro steps
-
Open a SQL query editor connected to a SQL Server-Fabric Warehouse database
-
Run the following script:
CREATE TABLE #Test (
ID INT
);
INSERT INTO #Test VALUES (NULL);
-
Execute the script using DBCode
-
Observe the error raised during the INSERT
Expected Behavior
Columns without explicit nullability definition should default to allowing NULL, matching SQL Server / Fabric Warehouse behavior. The INSERT statement should execute successfully.
Actual Behavior
DBCode treats the column as NOT NULL, causing the following error during INSERT:
"Cannot insert the value NULL into column 'ID', table 'tempdb.dbo.#Test'; column does not allow nulls. INSERT fails."
Environment
- DBCode version: 1.35.9
- VS Code (or fork) version: 1.127.0
- OS: CachyOS and Windows 11
- Database: Fabric Warehouse
- Connection: Direct (SQL endpoint)
Error Meesages (if applicable)
Cannot insert the value NULL into column 'ID', table 'tempdb.dbo.#Test'; column does not allow nulls. INSERT fails.
Screenshots
DBCode:

Fabric Warehouse Editor:

Logs
CREATE TABLE #Test (
ID INT
);
INSERT INTO #Test VALUES (NULL);
Cannot insert the value NULL into column 'ID', table 'tempdb.dbo.#Test_______________________________________________________________________________________________________________0000000000FF'; column does not allow nulls. INSERT fails.
Bug Description
When creating a table without explicitly specifying
NULLorNOT NULLfor columns, DBCode appears to treat the columns asNOT NULLby default. This behavior differs from SQL Server-compatible engines (such as Fabric Warehouse), where columns allowNULLby default if not specified.As a result, insert operations that should be valid fail with nullability errors.
Repro steps
Open a SQL query editor connected to a SQL Server-Fabric Warehouse database
Run the following script:
Execute the script using DBCode
Observe the error raised during the INSERT
Expected Behavior
Columns without explicit nullability definition should default to allowing
NULL, matching SQL Server / Fabric Warehouse behavior. The INSERT statement should execute successfully.Actual Behavior
DBCode treats the column as
NOT NULL, causing the following error during INSERT:"Cannot insert the value NULL into column 'ID', table 'tempdb.dbo.#Test'; column does not allow nulls. INSERT fails."
Environment
Error Meesages (if applicable)
Screenshots
DBCode:

Fabric Warehouse Editor:

Logs