Primary key for multiple field

  • Thread starter Thread starter Khusro
  • Start date Start date
K

Khusro

In one table two fileds jointly create unique record (each filed has
duplicate record). How can I assign primary key to both fields to avoid
duplicate record ?
ex. Filed A has : A, B,B,A,C
Field B has : T, M,O M, T

Joinlty Field(A+B), AT,BM,BO,AM,CT (Unique Record)
 
hi,
In one table two fileds jointly create unique record (each filed has
duplicate record). How can I assign primary key to both fields to avoid
duplicate record ?
Select (mark) both fields and set the primary key by pressing the
primary key button (in the tool bar or the context menu).


mfG
--> stefan <--
 
In one table two fileds jointly create unique record (each filed has
duplicate record). How can I assign primary key to both fields to avoid
duplicate record ?
ex. Filed A has : A, B,B,A,C
Field B has : T, M,O M, T

Joinlty Field(A+B), AT,BM,BO,AM,CT (Unique Record)

You do NOT need to - nor should you - create a third composite field.

Instead, open the table in design view. Ctrl-click field A and field B so
they're both selected, then click the Key icon; this will create a joint,
two-field primary key. Either individual field can have duplicates but the
combination must be unique.
 
Back
Top