Re: how to set composite key as foreign key?
Date: Sun, 07 Sep 2003 10:38:53 -0400
Message-ID: <3340329.1062945533_at_dbforums.com>
i am using sql server 2000.i know about alter table but if u can wrtite query and display to me it will be good for me. as i know the formate of alter table but for composite primary key i am not able to do it.
Originally posted by Bob Badour
>
>
> You don't mention the product you are using. Regardless, I suggest
> you open
> the manual and look for "ALTER TABLE".
>
> "rupali007" <member38432_at_dbforums.com> wrote in message
> news:3339785.1062916039_at_dbforums.com"]news:3339785.1062916039_at_d-
> bforums.com[/url]...
> > hi freinds,
> > i want to set any composite primary key in given table as
> foreigen key
> > by sql query not by enterprise manager.
> > suppose i have library as databse and two tables as
> > books(cAccnumber,ctitle,cedition)
> > issuedetails(cAccnumber,cMembercode,dDateofissue)
> > wher cAccnmuber is primary key in books and
> cAccnumber,cMembercode as
> > composite primary key in issuedetails.so if i want set
> cAccnumber as
> > foreign key then what will be query structure.
> > this is possible using enterprise manager but i want to do it by
> code.so
> > help me if u have any idea.
> > thanks
> > --
> Posted via
http://dbforums.com/http://dbforums.com
-- Posted via http://dbforums.comReceived on Sun Sep 07 2003 - 16:38:53 CEST