Why use primary key? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why use primary key?

25th Dec 2015, 9:57 AM
Dileep kumar
Dileep kumar - avatar
3 Answers
0
Primary keys are to provide an identity to each record in table Its just like roll no provided to each student in class, no two can have the same
25th Dec 2015, 2:27 PM
Ankush Kumar
Ankush Kumar - avatar
0
to can identify a row in the table
31st Jan 2016, 10:20 AM
Montacer Dhifallah
Montacer Dhifallah - avatar
0
Also for speed. Using integers as primary keys will speed queries from multiple tables joined on Primary Key columns that are Integers.
6th May 2016, 4:56 AM
Max Delwo
Max Delwo - avatar