MySQL - Are “NOT NULL” constraints needed for primary keys?

前端 未结 4 582
轮回少年
轮回少年 2021-01-04 04:15

is it necessary to declare \"NOT NULL\" constraints for primary keys in the MySQL database? A primary key cannot have NULL values because it auto_increments anyway and auto

4条回答
  •  孤城傲影
    2021-01-04 04:21

    WE need not declare explicitly the column as not null because Primary key constraint makes the column NOT NULL. I have checked in Oracle.

提交回复
热议问题