Connecting Tech Pros Worldwide Help | Site Map

relationship

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 18th, 2008, 10:25 AM
mo/-/sin
Guest
 
Posts: n/a
Default relationship

how to make relationship between two tables in sql server
2005......................

  #2  
Old August 18th, 2008, 12:05 PM
Philipp Post
Guest
 
Posts: n/a
Default Re: relationship

This is done by the REFERENCES clause.

CREATE TABLE Orders
(order_id INTEGER NOT NULL PRIMARY KEY,
customer_nbr INTEGER NOT NULL
REFERENCES Customers(customer_nbr)
ON UPDATE CASCADE,
<further columns here>
)

You could also use the graphical tools in management studio to do
this.

brgds

Philipp Post


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.