how to use intersection in a db_query? i want to select elements that exist on table_A and not in table_b, in other words, how to make the sql "intersect" in a drupal select query please ?
I've got it, just using :

$check = db_query("SELECT DISTINCT A.something FROM {table_A} as A
    where something not in (
    SELECT  B.something FROM {table_B} as B)
    ")-&gt;fetchField();