I have some records that I need to store in a database table and I want to distinguish one record from other records on the basis of name
field.
But as the datatype of name field is varchar
, it will effect the performance because comparing varchar
data with each other is time consuming process in comparision to a numeric field.
So I want each record to have a unique numeric field (say id
). But if I make the id
as primary key, then the more than one record can contain same name
.
What's the solution to the above problem?