Friday, February 24, 2012

Does a FK constraint create an index?

(SQL Server 2000, SP3a)
Hello all!
I was wondering if a foreign key constraint will create an index like a prim
ary key
constraint?
Thanks!
John PetersonNope.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eG2RnlF3DHA.1720@.TK2MSFTNGP10.phx.gbl...
(SQL Server 2000, SP3a)
Hello all!
I was wondering if a foreign key constraint will create an index like a
primary key
constraint?
Thanks!
John Peterson|||Nope, you'll have to build one yourself.
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eG2RnlF3DHA.1720@.TK2MSFTNGP10.phx.gbl...
quote:

> (SQL Server 2000, SP3a)
> Hello all!
> I was wondering if a foreign key constraint will create an index like a

primary key
quote:

> constraint?
> Thanks!
> John Peterson
>
|||Thanks Tom/Kalen! That's what I thought -- but wanted to double-check, as t
he CREATE
TABLE entry in BOL wasn't wholly specific on whether an index was created in
the PK
context (though, it alludes to it later), and I thought maybe the FK descrip
tion was
potentially similarly vague.
Thanks again!
John Peterson
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eG2RnlF3DHA.1720@.TK2MSFTNGP10.phx.gbl...
quote:

> (SQL Server 2000, SP3a)
> Hello all!
> I was wondering if a foreign key constraint will create an index like a pr
imary key
> constraint?
> Thanks!
> John Peterson
>

No comments:

Post a Comment