0
How write a sql query to check multiple condition is true the data fetch from multiple table
eg: Table 1, Table 2, Table 3 need to check 1 condition from Table 1 as true and next condition from Table 2 as true and next condition from Table 3 as true. KINDLY HELP ME WITH THIS QUERY. Select a. Name , a. Mail, b.name, b.mail from user as a join user_details as d on a.id =d.userid join user as b on a. Reports_to = b. Position_no Where a.employee='E' AND d.intial=1 And b.supervisor=1 Then where condition takes time to load the output.
4 Answers
+ 1
First show your attempt
0
Why table 'user' is referenced twice with different alias "a" and "b"?
0
Need to validate 2 columns in same table so used a,b
0
So you are looking forward to get name & e-mail of both the employee and his/her supervisor; is this what you are planning to do? cause I'm not sure.
Tell me more about these fields,
a.employee
d.intial
b.supervisor