Can I have a primary key without clustered index ? Also can I have multivalued clustered index?

后端 未结 2 1802
遇见更好的自我
遇见更好的自我 2021-01-19 10:23

Folks, I would like to understand the answer for the following questions:

  1. Can I have a primary key without clustered index ? ( I am aware that when we creat

2条回答
  •  庸人自扰
    2021-01-19 11:09

    MySQL and SQL-SERVER are different RDBMS. They have different capabilities and different syntax.

    When using InnoDB, MySQL always makes the PK the clustered index.

    SQL-SERVER, however, will let you create a PK without the CLUSTERED keyword, and let you use it within another index instead.

    In both cases, PrimaryKeys and Indexes (clustered or not) can cover multiple fields.

提交回复
热议问题