Is a Primary Key necessary in SQL Server?

前端 未结 10 1172
旧时难觅i
旧时难觅i 2020-12-05 03:58

This may be a pretty naive and stupid question, but I\'m going to ask it anyway

I have a table with several fields, none of which are unique, and a primary key, whic

10条回答
  •  天涯浪人
    2020-12-05 04:44

    A PK is not necessary.

    But you should consider to place a non-unique index on the columns that you use for querying (i.e. that appear in the WHERE-clause). This will considerably boost lookup performance.

提交回复
热议问题