Is it OK not to use a Primary Key When I don't Need one

前端 未结 12 1458
南笙
南笙 2020-12-17 23:06

If I don\'t need a primary key should I not add one to the database?

12条回答
  •  不知归路
    2020-12-17 23:32

    If you don't need a primary key then don't use one. I usually have the need for primary keys, so I usually use them. If you have related tables you probably want primary and foreign keys.

提交回复
热议问题