|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scripting foreign key relationship on a tableI have created a couple of new foreign key relationship on my table using
enterprise manager. I want to script these changes and send it to my client so that they can update the relationships on their end. how can I do it? Look up ALTER TABLE in BOL.
e.g. ALTER TABLE <table> ADD CONSTRAINT <FK constraint name> FOREIGN KEY (<FK column1>,<FK column2>,...) REFERENCES <referenced table> ( <key column1>, <key column2>, ...) you can get this from Query Analyzer as well, by going to the table in the object browser, opening the Constraints folder, right click on the constraint, select Script Object to <target> As \ Create Mike wrote: Show quote > I have created a couple of new foreign key relationship on my table using > enterprise manager. I want to script these changes and send it to my client > so that they can update the relationships on their end. how can I do it? > > |
|||||||||||||||||||||||