我想通过省略几行来合并两个表的行。通过合并两个表的某些特定行,可以再次获得我要省略的行。
我尝试了以下代码
$sx1=mysql_query("select distinct Name from exam1sem.invcount2
WHERE Name not in (select Name from exam1sem.invcount2 where
Date='$ee2[Date]' AND Time='$ee2[Time]'
union
select Name from exam1sem.reserve1 where Date='$ee2[Date]' AND
Time='$ee2[Time]'
)
union
select distinct Name from exam1sem.reserve1
WHERE Name not in (select Name from exam1sem.invcount2 where
Date='$ee2[Date]' AND Time='$ee2[Time]'
union
select Name from exam1sem.reserve1 where Date='$ee2[Date]' AND
Time='$ee2[Time]'
)
order by Avail, TD, Seniority, NOD");
但是它不起作用。请提供任何线索。