"Primary" keyword in Primary Key declaration

"Primary" keyword in Primary Key declaration

Post by Timm » Wed, 20 Nov 2002 05:01:25

Would someone please explain to me what is the keyword "Primary" after "ON"
means in this create table statement ?  I couldn't find it in the "create
table" help page.  Thank you very much!! -tim

 [PriceId] [GUID] NOT NULL ,
 [ProductId] [GUID] NOT NULL ,
 )  ON [PRIMARY] , -- <<<<<<< What is this key word Primary? What does it
 ) REFERENCES [Product] (
 ) REFERENCES [Price] (
) ON [PRIMARY] -- <<<<<<< What is this key word Primary? What does it do?


"Primary" keyword in Primary Key declaration

Post by Aaron Bertrand [MVP » Wed, 20 Nov 2002 04:59:46

Specifies which filegroup to store the table in, IIRC.

Aaron Bertrand, MVP

FREE server diagnostics component:

Quote:>  )  ON [PRIMARY] , -- <<<<<<< What is this key word Primary? What does it


1. "two dimensional" primary key

Hi all,

I've got a table with two integer columns named "die_row" and "die_col",
like so:

create table foobar ( die_row int, die_col int, die_rc_key int primary key )

I'd like to generate a primary key that allows quick lookup for a specific
die on a wafer. Both die_row and die_col will contain duplicates, of course.
Row and column values will be much smaller than 1000. My idea (probably
because I'm a C++ programmer) is to create a key that is set to
1000*die_row+die_col. Now I can do a quick lookup. I wrote a quicky
stored procedure to generate the index column:


 return (0)

My question: is there a direct way of setting doing this (without a stored
Or is there some entirely different way of doing this type of 2D lookup?

Andrew Queisser

2. How to make FMP run in background?

3. "Money" Primary keys

4. Couple of SQL Server/Access questions...

5. Problem with "counter" primary key

6. remote stored procedure calls

7. "primary key" for ODBC access

8. Pick and linux

9. update primary key [aid] to identity(300,1) Primary key

10. Numeric Primary Key vs. Combination Primary Key

11. Diff between Primary key and non primary key select

12. Joined Primary Key in Foxpro (Make 1 Primary Key from 2 fields)