标签云

微信群

扫码加入我们

WeChat QR Code


I would not separate those tables in the first place. It is much easier for you if you just have a true/false field ranked or so

2018年10月23日38分18秒

Using NOT IN() query -> SELECT gs.`skillname` FROM `generalskill` gs WHERE gs.`skillname` NOT IN (SELECT DISTINCT(rs.`skillname`) FROM `rankedskill` rs)

2018年10月23日38分18秒

I have to separate them because subskill are different from one character to another as well as the ranked point and misc point. with a lot of caracter, it will be really hard to manage. thanks anyway

2018年10月23日38分18秒

LEFT OUTER JOIN WHERE IS NULL - blog.codinghorror.com/a-visual-explanation-of-sql-joins

2018年10月23日38分18秒

hakre Thanks for the solution and the documentation. It was very well explained and work like a charm. You should put this as an answer so I will accept it.

2018年10月23日38分18秒

And you've downvoted because – ?

2018年10月23日38分18秒

I didn't. Thanks for the answer. I finally used OUTER JOIN

2018年10月23日38分18秒

Notulysses: You perhaps should take into account that this is Mysql. The DV is about the performance argument you make, in any case, you need to know about the concrete structure before doing the performance assumption (which you don't). However, in the general case (and that's for the -1), you should prefer LEFT JOIN instead of NOT EXISTS in Mysql. For an in-depth discussion, please see explainextended.com/2009/09/18/… - It's also better to tell newer users of SQL about the plain JOIN stuff IMHO before jumping to derived tables.

2018年10月23日38分18秒