Skip to content
Advertisement

Inner join on multiple columns in SQL Server

I have two tables

  • tbltask
  • tbluser

In tbluser I have two columns, userid and username

Sample data:

and in my second table, I have multiple tasks

Here saddam assigned a task to nizam

Here shahrukh assigned a task to ibrahim

I have a select command like

and i am getting this

now i want to join the table, because instead of i, i want username to be displayed

so answer which i want to display will be

how i can join the table?

Advertisement

Answer

Here is the query

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement