怎么把字段相同的两个表里的交集用SQL语句查出来?
怎么把字段相同的两个表里的交集用SQL语句查出来?
日期:2016-02-08 12:42:04 人气:2
select * from table1 where id in(select id from table2) 或者
select * from table2 where id in(select id from table1)
select * from 表 as a where a.rowid!=(select max(rowid) from 表 as b where a.id=b.id);
此为oracle中查找相同数据语句,其中里边的“表”指同一张表,where后的条件可以是很多相同