View Single Post

   
  #4 (permalink)  
Old 02-29-2008, 07:48 AM
CF
 
Posts: n/a
Default Re: How to add a foreign key constraint using the SQL server 2000enterprise manager

Actually, this is NOT a very complicated procedure.
Assume table1.custID = table2.custID.

In EM, open table1 in design mode. Click the menu bar icon for "Manage
Relationships". Click the "Relationships" tab. Click the "New" button.

Now you can select keys/fields from the tables. I'm sure you can figure
it out from there.

ldh



Simon Hayes wrote:
> "Mark" <mchung_pc@hotmail.com> wrote in message
> news:1117734724.479577.321970@o13g2000cwo.googlegr oups.com...
>
>>Hi,
>>
>>How to add a foreign key constraint using the SQL server 2000
>>enterprise manager?
>>Not by SQL.
>>
>>thanks
>>

>
>
> I think you have to create a database diagram, then manage relationships in
> that somehow, but I don't really know - EM is not a very good tool for
> database design or programming. I would do it in Query Analyzer, because
> then you have complete control over what you're doing and you also have a
> script you can save, put under version control, run against multiple
> databases etc.
>
> Simon
>
>

Reply With Quote