Empty string inserting a zero, not a null

前端 未结 4 1345
一整个雨季
一整个雨季 2021-02-14 07:42

My insert statement looks like this:

INSERT INTO foo (bar) VALUES (\'\');

The bar field was created like so:

bar I         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-14 08:38

    The way to do this is to not fill the field at all. only fill the ones that actually need to have a value.

提交回复
热议问题