chicago1985
Technical User
I would like to make sure there are no duplicate data entries in my Oracle 9i table (called MainTable) which has an Id field that is the primary key, ValData with a varchar data type, Fid and Fid2 are number data types.
Sometimes someone can enter a duplicate ValData, Fid and Fid2 and it will end up like this:
What constraints or restrictions can I place on the MainTable where it will never allow a duplicate entry into the table?
I would like to do this somehow in the database. If someone tries to enter a duplicate I should get a error message or something to indicate an attempt to enter duplicate data.
Please advise if this is possible?
Code:
Id ValData Fid Fid2
1 abc 34 2
2 efg 23 34
3 zeo 25 43
Sometimes someone can enter a duplicate ValData, Fid and Fid2 and it will end up like this:
Code:
Id ValData Fid Fid2
1 abc 34 2
2 efg 23 34
3 zeo 25 43
4 zeo 25 43
What constraints or restrictions can I place on the MainTable where it will never allow a duplicate entry into the table?
I would like to do this somehow in the database. If someone tries to enter a duplicate I should get a error message or something to indicate an attempt to enter duplicate data.
Please advise if this is possible?