![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
| 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 (DOT) com> wrote in message news:3339785.1062916039 (AT) dbforums (DOT) com"]news:3339785.1062916039@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 |
#4
| |||
| |||
|
|
i am using sql server 2000.... |
![]() |
| Thread Tools | |
| Display Modes | |
| |