Connecting Tech Pros Worldwide Forums | Help | Site Map

New table and adding primary key

Paul Sparrow
Guest
 
Posts: n/a
#1: Nov 13 '05
When making a new table from a query how in Access do a create a primary key.

IE:

SELECT
Item.StockCode,
Item.LongDesc,
step1.Style,
step1.AltStyle,
step1.StyleType,
step1.Notes,
Item.ProdClass,
step1.LGTH

INTO step2

FROM
Item RIGHT JOIN
step1
ON LEFT(Item.StockCode,step1.LGTH) = step1.Style

Pieter Linden
Guest
 
Posts: n/a
#2: Nov 13 '05

re: New table and adding primary key


psparrow@ibbgold.com (Paul Sparrow) wrote in message news:<4d1a7f78.0410220757.65701c32@posting.google. com>...[color=blue]
> When making a new table from a query how in Access do a create a primary key.
>
> IE:
>
> SELECT
> Item.StockCode,
> Item.LongDesc,
> step1.Style,
> step1.AltStyle,
> step1.StyleType,
> step1.Notes,
> Item.ProdClass,
> step1.LGTH
>
> INTO step2
>
> FROM
> Item RIGHT JOIN
> step1
> ON LEFT(Item.StockCode,step1.LGTH) = step1.Style[/color]


AFAIK, manually. You can't do it with a query. You can do it with
DDL, not DML SQL.
Closed Thread