Sobes.tech
Middle+

Can a primary key consist of multiple fields?

sobes.tech AI

Answer from AI

Yes, a primary key can consist of multiple fields — such a key is called a composite primary key. It is used when the uniqueness of a record is determined by a combination of several columns, rather than just one. For example, in an orders table, where uniqueness is determined by both the order number and the product code.

Can a primary key consist of multiple fields… - sobes.tech