Composite PK: how to specify column order in UI

P

peregenem

Here's my table:

CREATE TABLE Test1 (
employee_ID INTEGER NOT NULL,
start_date DATETIME NOT NULL,
end_date DATETIME,
PRIMARY KEY (start_date, employee_ID)
);

Because primary usage of this table is to produce employee reports
grouped on start_date, I want my PRIMARY KEY (PK), hence my clustered
index (physical order on disk) to be start_date then employee_ID,
rather than the other may around.

When I create the table using the above SQL DDL the column order is
honoured, as expected. However, I can't seem to be able to specify the
column order in the Access UI. I though that the order in which the
columns are selected before applying the PK (toolbar button) would do
it but apparently not: I get employee_ID then start_date every time.

Is it possible to specify the PK column order without using code? If
not, what is the resultant order based on (ordinal position in the
table, alphabetical order of column name, random, etc)?

Many thianks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top