I am trying to join data from two tables where the userid from table 1 is in table 2.
I have tried multiple variations with no luck and read a dozen posts here on SO on this topic.
The data in table one has an id, username, rolerequest, and appuserid. I am selecting the last three items and trying to join 3 items from table 2 when the appserid from table 1 is equal to the userid from table 2.
here is my latest attempt;
SELECT username, rolerequest, appuserid
FROM userrolespending
LEFT JOIN my_aspnet_membership.email,my_aspnet_membership.creationdate,my_aspnet_membership.lastlogindate
where my_aspnet_membership.userid = userrolespending.appuserid;
In this case, you don’t need to use
LEFT JOINbecause you only want to returnuseridthat are present from both tables.INNER JOINreturns records that theIDor the linking columns are both present on all tables.or to be exact,