DEV Community

Discussion on: Is Primary Key necessary in a table (DBMS)

Collapse
 
jasperhorn profile image
JasperHorn

Is it actually possible to create a table without a primary key?

You can never have two database rows that are exactly the same, so basically, if you don't define a primary key, that's basically the same as having a composite primary key consisting of all fields. In fact, I wouldn't be surprised if many databases actually implement it like that under the hood.