Insert NULL value into INT column

前端 未结 6 1490
名媛妹妹
名媛妹妹 2020-12-30 20:05

How can I insert NULL value into INT column with MySQL? Is it possible?

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 20:17

    The optimal solution for this is provide it as '0' and while using string use it as 'null' when using integer.

    ex:

    INSERT INTO table_name(column_name) VALUES(NULL);
    

提交回复
热议问题