목록웹/SQL (3)
Hansel
Left Outer Join select stadium_name,stadium.stadium_id,seat_count,hometeam_id,team_name from stadium left join team on stadium.hometeam_id=team.team_id order by stadium.hometeam_id; Right outer Join select * from emp right join dept on emp.deptno=dept.deptno Union / 일반 합집합, 전남,GK, 서울, 65 select region_name, player_name, position, weight from team natural join player where region_name='전남' and po..
notnull select nation, count(player_id) from player where nation is not null group by nation group by (소속팀별 평균 몸무게) select region_name, team_name, avg(weight), avg(height) from player natural join team group by region_name, team_name; 서브쿼리 - 키가 큰 선수순 select * from ( select player_name,height from player where height is not null order by height desc) where rownum
WHERE 조건 select empno, ename from emp where job LIKE '%SALESMAN' order by sal desc, empno 장씨성을 가진 선수 select p.player_name, p.position, p.join_yyyy, p.back_no from player p where p.player_name like '장%' 기본 JOIN select empno, ename, sal, dname from emp join dept on dept.deptno=emp.deptno where loc='DALLAS'; = 같은 버전 natural join select empno, ename, sal, dname from emp natural join dept where loc='..