I just want to copy the result set of this query into another table using Java:

 select basescore, count(*) from log 
 group by basescore     ;;;;;suppose________INTO log2 FROM log

I have tried a lot but it gives me errors can anybody help please. thanks in advance!

有帮助吗?

解决方案

Try this way:

select basescore, count(*) cnt 
into log2
from log     
group by basescore

其他提示

You don't need java for that. You can do this in one query

insert into log2 (score_column, count_column)
select basescore, count(*)
from log 
group by basescore
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top