سؤال

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