I have records that I need to save in a database table, and I want to select one record from other records based on a field name.
But since the data type is in the name field varchar, it will affect performance, since comparing data varcharwith each other is a time-consuming process compared to a numerical field.
Therefore, I want each record to have a unique numeric field (say id). But if I make the idmain key, then more than one record can contain the same one name.
What is the solution to the above problem?
source
share