SQL: Using NULL values vs. default values

前端 未结 13 2250
南旧
南旧 2020-12-01 01:28

What are the pros and cons of using NULL values in SQL as opposed to default values?

13条回答
  •  时光说笑
    2020-12-01 01:53

    In a Data Warehouse, you would always want to have default values rather than NULLs.

    Instead you would have value such as "unknown","not ready","missing"

    This allows INNER JOINs to be performed efficiently on the Fact and Dimension tables as 'everything always has a value'

提交回复
热议问题