Connecting Tech Pros Worldwide Forums | Help | Site Map

relationship

mo/-/sin
Guest
 
Posts: n/a
#1: Aug 18 '08
how to make relationship between two tables in sql server
2005......................

Philipp Post
Guest
 
Posts: n/a
#2: Aug 18 '08

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


Closed Thread