Question

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!

Was it helpful?

Solution

Try this way:

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

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top