Results 1 to 2 of 2
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919

    With ALTER TABLE, make added AutoNumber field "Primary Key"

    What can I add to the ALTER TABLE column addition of an autonumber field to also make it the "primary key"?



    "ALTER TABLE DonRegFam ADD COLUMN FamDonID COUNTER"

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    SQL (untested) and assuming field FamDonID exists at this time

    ALTER TABLE DonRegFam
    ADD PRIMARY KEY (FamDonID)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 02-07-2014, 11:57 AM
  2. Replies: 7
    Last Post: 05-12-2013, 05:15 AM
  3. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  4. ALTER TABLE does not set field "format"
    By GraeagleBill in forum Programming
    Replies: 5
    Last Post: 09-07-2012, 01:11 PM
  5. Replies: 1
    Last Post: 03-03-2012, 10:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums