0

Where is the primary key in query is actually used?

Ex query: select name FROM customers WHERE ID=7;

16th Apr 2018, 6:13 PM
av phani
av phani - avatar
3 Answers
+ 2
ID should be the primary key.
16th Apr 2018, 6:22 PM
Damyan Petkov
Damyan Petkov - avatar
+ 2
A primary key is used to identify a row univocally. For this reason a primary key is a unique key or a unique combination of keys
16th Apr 2018, 6:30 PM
Michele Virgilio
Michele Virgilio - avatar
0
You will find it in the database definition. From the query you cannot tell which field is the primary key, in this case it is propably the ID but that is a guess. In queries the primary key is mostly not name as primary key.
16th Apr 2018, 6:40 PM
sneeze
sneeze - avatar