SQL Keys by LearnCoding
SQL Keys by LearnCoding
Candidate Key
Primary
Primary Key
key Foreign Key
Table 1 Table 2
Alternate
Alternate Key
key
Super Key
primary key is a table attribute or
A
column that identify every record
present in a table uniquely.
In the above table, EmpId is the
Primary Key
candidate key is a column or a set of
A
columns the can qualify as a primary
key in the database.
1003 Akhilesh
. LC5351 Pk1435
It is the set of columns that helps to
identify rows in a table uniquely.
Super Key
Foreign Key
Table 2 Table 2
EmpId EmpName City DId DId Department
1003 Akhilesh
. Patna Pk1435
To see more
tech content
LEARN CODING