I have two tables and I want updateupdate the column GebruikerID
from table Topic
with the ID of the table Gebruiker
with random values.
You must also know the follow things:
Topic.GebruikerID
references toGebruiker.ID
.- Not every ID is used in both tables.
- The random number that must be generated exist in the table
Gebruiker
(columnID
) and must be updated into the tableTopic
(columnGebruikerID
). - I use SQL server in an express edition.
Here are some images.
- The relation between the tables
- The ID's of the
Gebruiker
-table