Re: Prevent duplicate data entry
- From: "Ana C. Dent" <anacedent@xxxxxxxxxxx>
- Date: Mon, 22 Oct 2007 02:56:56 GMT
"teser3@xxxxxxxxxxx" <teser3@xxxxxxxxxxx> wrote in
news:1193009869.171884.198420@xxxxxxxxxxxxxxxxxxxxxxxxxxx:
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.
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:
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.
http://www.orafaq.com/forum/t/91265/74940/
.
- References:
- Prevent duplicate data entry
- From: teser3@xxxxxxxxxxx
- Prevent duplicate data entry
- Prev by Date: How to create trigger after update on the simple slide
- Next by Date: Re: How to create trigger after update on the simple slide
- Previous by thread: Prevent duplicate data entry
- Next by thread: Re: Prevent duplicate data entry
- Index(es):