BlueBallons wrote: » Hi i am trying to Join two sql tables. Table 1 is called account and it consits of account_id, fname, lname, picture and Table 2 is called friendpending and consits of account_id, friend_id and message. Im making a program that allows users to add friends, i can pass in the account_id into friendpending and it returns the friend_id's. How can i join both tables so instead of returning the friend_id it returns the first and last name connected to that id. This is what i have tried so far. SELECT account.fname, account.lname, account.picture from account INNER JOIN friendpending ON account.account_id = friendpending.account_id WHERE friendpending.account_id = p_account_id; p_account_id is the account_id passed in by the user.