Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2006

Tip: Looking for answers? Try searching our database.

Primary Key Index in Make Table Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
William - 17 Sep 2006 02:33 GMT
I have a Make Table Query which makes a table called "Companies."  The source
for the query is a table named "Outlook."  I wish to make a one of the fields
which is created in table "Companies" a Primary Key Index.  How can I do this?
Granny Spitz - 17 Sep 2006 03:51 GMT
> I wish to make a one of the fields
> which is created in table "Companies" a Primary Key Index.  How can I do this?

By running a second query that uses DDL SQL to alter the table after you run
the make table query.  You need to create a new query and open it in SQL view
to type this yourself, hon.  I don't know which column and data type you want
your primary key to be, but here's an example of an AutoNumber called ID:

ALTER TABLE Companies
 ALTER COLUMN ID COUNTER
 CONSTRAINT PrimaryKey PRIMARY KEY;
William - 17 Sep 2006 05:51 GMT
Thanks for your Help!!!!

> > I wish to make a one of the fields
> > which is created in table "Companies" a Primary Key Index.  How can I do this?
[quoted text clipped - 7 lines]
>   ALTER COLUMN ID COUNTER
>   CONSTRAINT PrimaryKey PRIMARY KEY;
Granny Spitz - 17 Sep 2006 07:16 GMT
>Thanks for your Help!!!!

You're welcome, William!  : )
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.