I am having a three tables in my project which are listed below.
admins
users
staffs
I need my system to authenticate by the three tables username and password and based on which table it uses, I have to set the authorization role as admin, user, staff respectively.
CREATE VIEW <anyname you want> AS
SELECT username,password,"ADMIN" as role from admins
UNION
SELECT username,password,"USER" as role from users
UNION
SELECT username,password,"STAFF" as role from staffs