misho misho - 4 years ago 172
SQL Question

Insert NULL value into INT column

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

Answer Source

If the column has the NOT NULL constraint then it won't be possible; but otherwise this is fine:

INSERT INTO MyTable(MyIntColumn) VALUES(NULL);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download