Home > database > SQL in negative selection problem of multiple correlation
SQL in negative selection problem of multiple correlation
Time:09-20
The one left in the SQL join more where column_name!=value Results: the main table one, namely, have not reached the desired results, i.e. not filter, For multiple data corresponding to the one in the more and more individual data by filtering, the remaining no filtering data will produce the corresponding one, I want to achieve more contained in the data meet the screening, for one, has also been filtering, A great god, please help solve, besides the use 'in' what good method, make the fastest query,
CodePudding user response:
I use mybatis, because other does not meet the screening data generated in the query more one data instance, so mybatis processing, also produced one data instance, so also can be in mybatis can solve
CodePudding user response:
SELECT * TABLE_A A LEFT JOIN TABLE_B ON b. B=A. * * * * * * WHERE a. * *=? AND b. * *=? Above, TABLE_A is what you have said, TABLE_B, it is much, b. after ON * * *, * * *=a. is associated logic of A and B, WHERE after, if not satisfied, it will not be displayed, Your description, I think should be increased after the WHERE content,