Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Prevent duplicate data entry

Re: Prevent duplicate data entry

From: Ana C. Dent <anacedent_at_hotmail.com>
Date: Mon, 22 Oct 2007 02:56:56 GMT
Message-ID: <YjUSi.10961$oC3.2138@newsfe08.phx>


"teser3_at_hotmail.com" <teser3_at_hotmail.com> wrote in news:1193009869.171884.198420_at_e9g2000prf.googlegroups.com:

> 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/ Received on Sun Oct 21 2007 - 21:56:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US