0

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!

kosa
  • 65,990
  • 13
  • 130
  • 167
user2496503
  • 907
  • 5
  • 13
  • 21

2 Answers2

1

Try this way:

select basescore, count(*) cnt 
into log2
from log     
group by basescore
Robert
  • 25,425
  • 8
  • 67
  • 81
0

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
juergen d
  • 201,996
  • 37
  • 293
  • 362