我现在的SQL语句是:
select count(1) from main_table where 条件1 and 条件2
工作需要,我现在把main_table 分成了3个小表,小表的数据结构3个完全一样,但3个表都不能制作关键字,
我如何连接两个表的查询呢,没有关键字
我现在写的是:
select count(1) from (select * from main_table1 union select * from main_table2)
where 条件1 and 条件2我现在感觉写的不对,请各位大侠指点我一下!谢谢!