A primary key is a unique identifier for a row in a table. It is used to uniquely identify each row and ensure data integrity. For example, an employee table might have an EmployeeID field as the primary key.
A foreign key is a column or set of columns in a table that references the primary key of another table. This is used to create relationships between tables. For example, an Order table might have a CustomerID foreign key that references the primary key of the Customer table.