DataGrip
 
Get DataGrip
You are viewing the documentation for an earlier version of DataGrip.

Primary keys

Last modified: 22 September 2023

A primary key contains unique values and identifies each row in a table.

For some databases, the primary key cannot contain NULL values. A table can have only one primary key, and this primary key can consist of single or multiple columns. When a primary key consists of multiple columns, the data from these columns is used to determine whether a row is unique.

Primary keys can be seen in the Database Explorer. You can see a reference on node and object icons in the Data sources and their elements chapter of Database Explorer topic.

For the table column icons, refer to Possible icon combinations for columns.