Hello everyone:<br>
<br>
I am brand new to SQL Server (1 day and running!). I am trying to set foreign keys for various tables, and want to make sure I am doing it correctly. I had no problem setting the primary key in the enterprise manager, but was a little confused setting the foreign key for my child table. <br>
<br>
I created my child table and selected the advanced button. Then, I went to the "referenced table" combo and selected my parent table for the reference. Then, I selected the field I want to name for a foreign key in the "foreign key columns" box. Once I did that, I selected ADD. Once I did that, the top box, labeled "foreign key" was filled in with FK__ 3 ___ 10.<br>
<br>
Nothing special happened after I did this, so I presume I did this correctly. However, when I closed the table and re-opened it again, the values I selected in the foreign key tab to create my foreign key were no longer there!<br>
<br>
Did I do this correctly? I am probably making a bigger deal out of this than I should.... it is just very different from FoxPro, which I am use to working with.<br>
<br>
Thanks in advance for any comments
<br>
I am brand new to SQL Server (1 day and running!). I am trying to set foreign keys for various tables, and want to make sure I am doing it correctly. I had no problem setting the primary key in the enterprise manager, but was a little confused setting the foreign key for my child table. <br>
<br>
I created my child table and selected the advanced button. Then, I went to the "referenced table" combo and selected my parent table for the reference. Then, I selected the field I want to name for a foreign key in the "foreign key columns" box. Once I did that, I selected ADD. Once I did that, the top box, labeled "foreign key" was filled in with FK__ 3 ___ 10.<br>
<br>
Nothing special happened after I did this, so I presume I did this correctly. However, when I closed the table and re-opened it again, the values I selected in the foreign key tab to create my foreign key were no longer there!<br>
<br>
Did I do this correctly? I am probably making a bigger deal out of this than I should.... it is just very different from FoxPro, which I am use to working with.<br>
<br>
Thanks in advance for any comments