the relation ship between two tables is defined by means of foreign key relationshipsee this illustrationCREATE TABLE Products(ProductID int NOT NULL PRIMARY KEY,ProductName varchar(100))CREATE TABLE Orders(OrderID int NOT NULL PRIMARY KEY,ProductID int NOT NULL,Qty int,Price money)ALTER TABLE OrdersADD CONSTRAINT fk_PerOrdersFOREIGN KEY (ProductID)REFERENCES Product(ProductID)
the above code will create a relationship between Orders and Products------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs