Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prevent duplicate record

Status
Not open for further replies.

fatchoy

MIS
Jul 19, 2001
31
JP
Hi

I have create a new table without primary key.
I insert a row with column A of value 3345.Then I insert another row with column A of the same value 3345.

The rest of the colume(column B ...Column z) also become duplicate of each other.Why is this so?

I need the rest of the column to remain of their orginal value.

Is anybody can help, I be awesome gateful.

thanks in advance
 
create a unique index on the field


Bastien

Cat, the other other white meat
 
what do u mean by create unique index?

what if you have a group of 4 got repeated itself for twice, how can you created a unique index? if so, will this index affected the original table in the database?

m
 
a unique index (indeces in general) can span multiple columns...the original poste indicates that records will not be the same across all the columns, so he could take this approach

ie

create index my_unique_idx on table1 (column1,column2,column3)


Bastien

Cat, the other other white meat
 
Fatchoy,

Did Bastien's solution resolve your need? Did you understand his solution? If you are still having problems, please let us know.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 09:45 (06May04) UTC (aka "GMT" and "Zulu"), 02:45 (06May04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top