Reputation: 3440
I have a simple database schema.
Table TAGS and table USERS.
How I can make a column in USERS table with List of TAGS ?
Upvotes: 1
Views: 125
Reputation: 263733
It sounds that it is most likely to have Many-to-Many
relationship.
Users Table
Tags Table
UserTagLink Table
you need to join both tables
SELECT a.*, c.* -- <<== select the columns you want to display
FROM Users a
INNER JOIN UserTagLink b
ON a.UserID = b.UserID
INNER JOIN Tags c
ON b.TagID = c.TagID
To further gain more knowledge about joins, kindly visit the link below:
Upvotes: 2