How do we do LEFT JOIN with old syntax?
<p>How do we do LEFT JOIN with old syntax? </p>

<p>Let's say you have a User table and UserRole table, and you are holding the ID of the UserRole in User table. </p>

<p>Here is the query to retrieve all User's names, and the Role Names with the new notation:</p>

<pre><code>SELECT U.Username, US.[Desc] FROM [User] U
INNER JOIN UserRole US ON U.UserRoleId = US.Id
</code></pre>

<p>And here is the old notation:</p>

<pre><code>SELECT U.Username, US.[Desc] FROM [User] U, UserRole US
WHERE U.UserRoleId = US.Id
</code></pre>

<p>Now, let's assume that all users don't have a role, the UserRoleId is either 0 or NULL. </p>

<p>Here is the query to retrieve all User's names, and the Role Names with the old notation:</p>

<pre><code>SELECT U.Username, US.[Desc] FROM [User] U
LEFT JOIN UserRole US ON U.UserRoleId = US.Id
</code></pre>

<p>Question is: How do we do the same with old syntax, without using the word JOIN?</p>