Mysql Table Column Cannot Be Null

后端 未结 1 814
忘了有多久
忘了有多久 2021-01-20 09:49

I have created a table with three columns, Id , Name , Quantity. It appears that when I am trying to insert a row with at least one null column or when i am trying to set th

1条回答
  •  Happy的楠姐
    2021-01-20 10:06

    ALTER TABLE mytable MODIFY quantity NUMERIC(20, 2)
    

    Replace NUMERIC(20, 2) with your actual datatype, but without NOT NULL constraint.

    To show your current column definitions, run

    SHOW CREATE TABLE mytable
    

    in mysql (the command line client)

    0 讨论(0)
提交回复
热议问题