gns (1) 썸네일형 리스트형 2023/08/09 IDS 오전 시간은 어제 했던 실습 해답을 해주는 시간 [ 실습 1 ] 회원의 평균 나이를 구하라. - 출력 결과는 "회원의 평균 나이: ??" 형식으로 출력한다. declare @age int, @total int, @cnt int set @cnt=0 set @total=0 declare cur cursor for select age from member open cur fetch next from cur into @age while @@fetch_status=0 begin set @total = @total + @age set @cnt = @cnt + 1 fetch next from cur into @age end select @total / @cnt close cur deallocate cur 회원의 평균.. 이전 1 다음