What MySQL property is used to create a surrogate key in MySQL?

What MySQL property is used to create a surrogate key in MySQL?

Right Answer is:

AUTO_INCREMENT

SOLUTION

  • AUTO_INCREMENT MySQL property is used to create a surrogate key in MySQL.
  • A surrogate key is very similar to a primary key in that it is a unique value for an object in a table.
  • However, rather than being derived from actual data present in the table, it is a field generated by the object itself.
  • A surrogate key in a database is a unique identifier for either an entity in the modeled world or an object in the database.
  • The surrogate key is not derived from application data, unlike a natural key.
Scroll to Top