I'm tying to design a Sign In page. I have three tables students, professors, dean. I want to fetch the password for the given username and check if it's correct. I can do this for one table with :
def get_password_by_username(username):
c.execute("SELECT password FROM students WHERE username = :username", {"username": username})
return c.fetchone()
How can I search for the username in all three tables at the same time? thanks.