select * from tab_name where (col1,...,coln) in (select * from tab_name group by col1,...,coln having count(*)>2);
为什么单独的select col from tab group by col having count(col)>2) 这个句子不能运行而放在where字句中就能运行呢? 还有其他方法没有呢?
select col from tab group by col having count(col)>2 这个语句能运行 而select * from tab group by col having count(col)>2) 这个语句就不能运行了,为什么 ? 而我将select * from tab where col in ( select col from tab group by col having count(col)>2) 改为 select * from tab where col in ( select * from tab group by col having count(col)>2)时 提示我说too many values,这是怎么回事啊 ??
(select * from tab_name group by col1,...,coln having count(*)>2);
这个句子不能运行而放在where字句中就能运行呢?
还有其他方法没有呢?
这个语句能运行
而select * from tab group by col having count(col)>2)
这个语句就不能运行了,为什么 ?
而我将select * from tab
where col in (
select col from tab group by col having count(col)>2)
改为
select * from tab
where col in (
select * from tab group by col having count(col)>2)时
提示我说too many values,这是怎么回事啊 ??
select col,col1 from tab group by col having count(col)>2
运行也出错,怎么回事,多加一个表里的字段就不行嘛?