I have two tables in my database regarding the login details for both of my users (Librarians and Students) I have separated the user\'s details into 2 separate tables tblUserLi
select StudentID,Password,FirstName,LastName from tblUserStudent where studentID='S1202836'
union
select LibrarianID,Password,null,null from tblUserLibrarian where LibrarianID='L1202836'
I'm not sure if i understand your requirement correctly, but it seems you want a union, not a join, and since your librarian table has fewer columns than your user student table, you have to fill up with null columns so the column count matches.