The complete guide to SQL PRIMARY KEY . Learn the syntax, parameters, use cases and find practical examples in the Hightouch SQL Dictionary. A primary key is a column or columns in a database table with values that uniquely identify each row or record. For example, an employee ID column could be a primary key in a table of employee information. Primary keys play an important role in relational databases by reinforcing data integrity and enabling successful data retrieval. Learn how to use the SQL PRIMARY KEY constraint to create a unique identifier for each row in a table. See syntax, examples, and default names for different database systems. Primary keys implement a technical mechanism to check if every row has a unique, non-empty value in the primary key column. For example, if you try to insert a new row with a duplicate value in the primary key column, this row will be rejected by the primary key . Another feature of primary keys is a control to avoid NULL values.