Usage of NULL Columns in Daily Operations

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 日常NULL列的使用情况

| username: HACK

【TiDB Usage Environment】Production, Testing, Research
【TiDB Version】
【Encountered Problems】
Problem 1: Is the usage of NULL in TiDB the same as in MySQL?
Problem 2: When allowing NULL values in table fields, do you usually set a default value, such as an empty string, or do you leave it unset so that if the application does not explicitly insert content into this field, it stores NULL?

【Reproduction Path】What operations were performed to encounter the problem
【Problem Phenomenon and Impact】

【Attachments】

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: Kongdom | Original post link

Our development standards do not allow null values; any field that can be null must have a default value.

| username: alfred | Original post link

There are indeed NULLs in actual use.

| username: HACK | Original post link

Rules are rules, but the actual situation can be different.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.