Index on 2 columns

lactaman

New member
Local time
Today, 08:06
Joined
Apr 15, 2008
Messages
4
Hi,

I want to have an index such that the combination of "line no" and "calving date" are unique.

I have tried:

CREATE UNIQUE INDEX index1
ON [main table] ([Line no], [Calving Date])
;

And

CREATE INDEX index1
ON [main table] ([Line no], [Calving Date])
WITH PRIMARY;

but I get a unique index on Line no

Any suggestions?

Regards

lactaman
 
Go to the table design view, hold control down and select both fields you want, right click and select primary key.

I think.
 
Ok

got it working now - thanks
 

Users who are viewing this thread

Back
Top Bottom