Several keys

  • Thread starter Larry Daugherty
  • Start date
L

Larry Daugherty

You can only have one Primary Key but you can have ,more than one
Index..

HTH
 
P

Pieter Wijnen

you're wrong, you can only have 1 primary key for a table (as with
Oracle/MSSQL)
but you can have several (unique) indexes. Just bring up the indexes
properties window or add them by way of code or CREATE INDEX queries
(Differs slightly from Oracle as you may use the same index name for several
tables - look up help on CREATE INDEX)
And to my knowledge no index hints can be givven.

HTH

Pieter
 
A

Avi

Hello,

On databases such as Oracle, and Sql-Servers,
elementary thing I can do is making several keys for a single table.
I see that on access (2003), I can do only one key per table (it may be of
several fields, but it still one key).
correct me if I am wrong.

Is there any tricky way to simmulate several keys for a single databse ?

Can I do hinting (the equivalent oracle : selec /*+ index (table_1 index_1)
*/ ) or force using a key from tables I use ?

Thanks :)
 
A

Albert D. Kallal

There is not difference in sql server, or ms-access for that matter.

All of those systems only allow one primary key for a table.

Do note that you can have a primary key that is made up of several fields
(perhaps that was your question?)

To do the above, when in table design mode you simply hold down the ctrl key
while you select the fields you want to make up the primary key, and then
hit the 'key' button.
 
Top