In case you have a requirement where you are suppose to restrict the duplicate records.
E.g. :
If in case you have 4 fields.
And you require that any two same record values in the four or less columns should not repeat.
You don't want same record(same combination) to be saved twice.
Column: A B C D
amit 60 India emp
yatish 60 India emp
amit 60 India emp ****this record should not be saved
Solution :
1) Make new index to the table.
2) Add the fields that you want to be added to the restricting combination.(Here all 4)
3)Go to properties and set 'AllowDuplicates' to "No".
This will restrict you from saving any duplicate combination in the table.
Note: In case you need only A & B column without repeat then add only A & B fields to index.
No comments:
Post a Comment