\

해병 코딩

728x90
반응형

havig 사용하기

직급(position)별로 pay 합과 평균 구하는데 ,직급이 과장인 사람만 출력

            select position , sum(pay),avg(pay)
            from emp2
            group by position
            having position ='과장';

숫자 함수

 

 

--
select name hpage,instr(hpage,'/',-1)
from professor;
--
select name hpage,substr(hpage,instr(hpage,'/',-1)+1)"홈피주소"
from professor
where hpage is not null;

 

 

 

728x90
반응형

이 글을 공유합시다

facebook twitter googleplus kakaoTalk kakaostory naver band