If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Primary keys duplicates okay

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-27-03, 12:08
BabyBekka BabyBekka is offline
Registered User
 
Join Date: Dec 2003
Posts: 13
Primary keys duplicates okay

hello

how can i have a primary key that can have duplicates as the data in my database requires this for some of its tables..... or is this not possible in access?

bfn

Bekka
Reply With Quote
  #2 (permalink)  
Old 12-27-03, 12:40
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
it is not possible at all in any database that understands primary key

primary keys, by definition, are unique and not null

however, you could have a composite primary key, of which one of the columns will have duplicate values

what are you trying to do? what are your columns values?


rudy
http://r937.com/
Reply With Quote
  #3 (permalink)  
Old 12-27-03, 14:34
BabyBekka BabyBekka is offline
Registered User
 
Join Date: Dec 2003
Posts: 13
Quote:
Originally posted by r937
it is not possible at all in any database that understands primary key

primary keys, by definition, are unique and not null

however, you could have a composite primary key, of which one of the columns will have duplicate values

what are you trying to do? what are your columns values?


rudy
http://r937.com/
the values are all numbers that i am entering.
if the table has a composite key one of them can have duplicate keys but how can i tell it to allow it to? this is access
Reply With Quote
  #4 (permalink)  
Old 12-27-03, 15:02
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
you can tell access to allow a composite primary key by highlighting more than one row in table design view and then clicking the primary key icon

you may have to un-primary the single column first


rudy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On