开发者社区 问答 正文

A Question for SQL: constraints?

已解决

What is the difference between UNIQUE and PRIMARY KEY constraints?

展开
收起
1780169608831412 2021-10-16 14:49:59 585 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 网络规划设计师、敏捷专家、CISP、ITSS服务经理、ACA全科目、ACP4项、ACE、CBP、CDSP、CZTP等。拥有 PRINCE2 Foundation/Practitioner、CCSK、ITIL、ISO27001、PMP等多项国际认证。 专利5+、期刊10+、知识产权师。核心期刊审稿人。
    采纳回答

    The differences are as follows:

    A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys.
    The primary key cannot contain Null values whereas the Unique key can contain Null values.
    
    2021-10-16 16:02:21 举报
    赞同 1 评论

    评论

    全部评论 (0)

    登录后可评论
问答分类:
SQL
问答标签:
问答地址:
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等