N
N
nkorobkov2017-04-02 11:10:06
MySQL
nkorobkov, 2017-04-02 11:10:06

How to populate a join table in SQL?

There is such a database structure:
49e158f2b3484ae29e1d5509a76acf0d.pngI work in MySQL Command Line Client, i.e. I write everything in plain SQL!
Question: how is the link table filled? Do I have to fill it in manually by specifying the org_id and linking it to the service ID (service_id)? Or if you make links between tables, then these fields will be filled in by themselves, and I will only have to set the cost? I just do not know the principle of how this is done, who knows, please tell me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2017-04-02
@nkorobkov

manually, specifying identifiers from other tables. foreign key will simply prevent you from creating an entry with a non-existent external id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question