Alter SQL table - allow NULL column value

前端 未结 2 476
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 21:31

Initially, the table \"MyTable\" has been defined in the following way:

CREATE TABLE IF NOT EXISTS `MyTable` (
  `Col1` smallint(6) NOT NULL AUTO_INCREMENT,
         


        
2条回答
  •  有刺的猬
    2021-01-03 22:17

    The following MySQL statement should modify your column to accept NULLs.

    ALTER TABLE `MyTable`
    ALTER COLUMN `Col3` varchar(20) DEFAULT NULL
    

提交回复
热议问题