반응형
[Oracle SQL] SELECT 실습_ WHERE 절
I WHERE
▶ WHERE : 원하는 ROW만 조회
1.
SELECT * FROM EMP WHERE DEPTNO = 20;
2.
SELECT EMPNO, ENAME, JOB, SAL FROM EMP WHERE SAL > 1500;
3.
SELECT EMPNO, ENAME, JOB, SAL, DEPTNO FROM EMP WHERE DEPTNO = 20 AND SAL > 1500;
4.
SELECT DEPTNO, ENAME, JOB FROM EMP WHERE JOB = 'SALESMAN';
5.
SELECT DEPTNO, ENAME, JOB FROM EMP WHERE 1=1;
6.
SELECT DEPTNO, ENAME, JOB FROM EMP WHERE 1=2;
I 비교연산, 사칙연산
1.
SELECT EMPNO, ENAME, SAL, SAL*12, COMM, COMM+300 FROM EMP;
2. 연산자 우선순위 확인
SELECT EMPNO, ENAME, SAL, SAL+500*12,(SAL+500)*12 FROM EMP;
반응형
'ORACLE SQL > 01_SELECT 실습' 카테고리의 다른 글
[Oracle SQL] SELECT 실습_ DUAL (0) | 2018.12.26 |
---|---|
[Oracle SQL] SELECT 실습_ 문자열 결합 (0) | 2018.12.26 |
[Oracle SQL] SELECT 실습_ ALIAS (0) | 2018.12.25 |
[Oracle SQL] SELECT 실습_ SELECT LIST (0) | 2018.12.25 |
[Oracle SQL] SELECT 실습_ SELECT (0) | 2018.12.25 |