A
A
Alexander2014-04-15 17:14:51
SQL
Alexander, 2014-04-15 17:14:51

How to edit relationships between DB tables in VS 2012?

I can't edit Relationships between tables
62b5d54f27ae4e4ea6e7692875244236.png
. I can't open the relationship editing window.
Did according to the article

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexandr, 2014-04-16
@alexofree

Did it like this:

CREATE TABLE [dbo].[UserRole] (
    [Id]     INT NOT NULL,
    [UserID] INT NOT NULL
 REFERENCES [dbo].[User] (Id)
 ON DELETE CASCADE
    ON UPDATE CASCADE,
    [RoleID] INT NOT NULL
 REFERENCES [dbo].[Role] (Id)
 ON DELETE CASCADE
    ON UPDATE CASCADE,
    PRIMARY KEY CLUSTERED ([Id])
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question