473,395 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to add a foreign key constraint using the SQL server 2000 enterprise manager

Hi,

How to add a foreign key constraint using the SQL server 2000
enterprise manager?
Not by SQL.

thanks

Jul 23 '05 #1
3 11424

"Mark" <mc*******@hotmail.com> wrote in message
news:11**********************@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
Jul 23 '05 #2
Many thanks.

regards

Jul 23 '05 #3
CF
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" <mc*******@hotmail.com> wrote in message
news:11**********************@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

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bodza Bodza | last post by:
I'm having an argument with an incumbent self-taught programmer that it is OK to use null foreign keys in database design. My take is the whole point of a foreign key is that it's not supposed...
1
by: Jason Madison | last post by:
We sometimes get very large databases that we want to cut down to use for testing. The information is all related to a central accounts table. The way I thought of doing this is to grab all...
2
by: adammitchell | last post by:
I'm trying to create a local copy of a popular CRM database called Salesforce.com. Many of the tables in the DB have FOREIGN KEY references that I want to preserve, but I've run into a chicken and...
2
by: adammitchell | last post by:
How can you indicate that a FOREIGN KEY constraint references two columns in two different tables? "SQL Server Books Online" show an example of how to reference two columns in the SAME table:...
1
by: Jean-Yves | last post by:
Hi. I have a weird problem when I update my database. I am using SQL Server 2000. In my VB.NET application I used Web Services for insert, update, delete. I have a relation between 2 tables in my...
11
by: FreeToGolfAndSki | last post by:
Hi, I have an Orders Table that has Employee1 and Employee2 (one is the sales rep the other is the telemarketing rep) Both of these fields need to cascade update against the Employees table. I...
1
by: Alex | last post by:
Hi Everyone, Most of our MS SQL Servers are still running on SQL 2000, but being I will soon be upgrading my workstation to Vista Business I'd like to install MS SQL 2005 Enterprise Manager to...
1
by: apax999 | last post by:
Kinda new to SQL, using SQL Server 2005. I have some foreign keys in a couple of tables. I need to drop these tables, but can't since I'll get the error: Msg 3726, Level 16, State 1, Line...
6
by: bobdurie | last post by:
If i create a simple table with a foreign key constraint, does it create an implicit index on that given ID? I've been told this is done in some databases, but i need to know for sure if SQL...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.