- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 09:55 AM
Thanks for helping us with this. Are you sure about that? It seems the documentation says it should still be possible
"If the target table schema does not define any default value for the inserted column, Databricks SQL assigns NULL if the column is nullable"
And everything is nullable unless you explicitly set NOT NULL?
https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html
I think it is important to be clear here as different databases systems handles this differently. In PostgreSQL for example it
Each column not present in the explicit or implicit column list will be filled with a default value, either its declared default value or null if there is none.
In MySQL it becomes implicit or explicit default values (not NULL?)
If strict SQL mode is not enabled, any column not explicitly given a value is set to its default (explicit or implicit) value.