sql to retrieve username and password from 3 tables : i have to retrieve username and password from 3 tables (user1, user2, admin, having username and password in each table) with no foreign keys.

...
 SqlCommand cmd = new SqlCommand("select * from user1 UNION select * from user2 union select * from admin where username=@username and password=@password", con);
...