Skip to content
Advertisement

Selecting values from second column alongside the values from first column in the same row

I am trying to get values matching the value from the second column. For example, I want to know who is the sender for Bill Gates by only using IDs.

I have two tables,

I want to select based on “user_receiver” column the matching values in the column “user_sender”

For example, I want to know who is user_sender for 2 OUTPUT:

Advertisement

Answer

You need to join the tables and select the rows you want

you have access to all columns of both tables by addressing them with their alias

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