Removing duplicate columns in one row while merging corresponding column values
<p>Apologies if this seems simple to some, I am still in the (very) early stages of learning!</p>

<p>Basically I've got a table database that has multiple users (Users_ID), each with a corresponding access name(NAME). The problem is, some Users have multiple access names, meaning when the data is pulled, there is duplicates in the User_ID column. </p>

<p>I need to remove the duplicates in the User column and join their corresponding access names in the NAME column, so it only takes up 1 row and no data is lost.</p>

<p>The current SQL query I'm using is :</p>

<pre><code>select Table1_user_id, Table2.name,
from Table1
inner join  Table2
on Table1.role_id =  Table2.role_id
</code></pre>

<p>An example of what this would return:</p>

<pre><code>USER_ID  |  NAME
-------    --------------
Tim        Level_1 Access
John       Level 2 Access
Tim        Level 2 Access
Mark       Level 3 Access
Tim        Level 3 Access
</code></pre>

<p>Ideally, I would remove the duplicates for Tim and display as following:</p>

<pre><code>USER_ID  |  NAME
-------    ----------------------------------------------
Tim        Level_1 Access, Level 2 Access, Level 3 Access
John       Level 2 Access
Mark       Level 3 Access
</code></pre>

<p>Thanks in advance for any help regarding this and sorry if something similar has been asked before! </p>