S
S
Senture2019-02-06 00:17:00
SQL
Senture, 2019-02-06 00:17:00

How to establish a relationship between tables?

Hello!
There are 2 tables:

User table
5c59fc62abea7410732464.png
Order table
5c59fc74d7f53269305517.png

It is necessary to establish a relationship from the Client and Manager fields from the Orders table to the Login (by task) or Name (if not to Login) field from the Users table.
When trying to establish a relationship:
5c59fcf0171a8322694417.png
The following error appears:
5c59fcfb7c2f4236659590.png
I don’t understand what to do, I googled, but I didn’t find a good answer - I googled badly, but I still don’t know how to google so well -_-.
Please tell me what am I doing wrong?
PS Thank you all so much!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitsliputsli, 2019-02-06
@Senture

Actually, everything is written in the error, the Users.Login column is neither PK nor UNIQUE. Actually, make it so.

K
Konstantin Tsvetkov, 2019-02-06
@tsklab

The Password field is not a key.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question