본문 바로가기

Database/Oracle

연산자

- 산술 연산자

+, -, *, /

 

SELECT AGE+10 FROM MEMBERS

 

- 문자열 더하기 연산자

||

 

SELECT NAME||​'('||AGE||')' FROM MEMBERS

- 비교 연산자

=, !=, ^=, <>, >, <, >= <=, IS NULL, IS NOT NULL​

SELECT * FROM MEMBERS WHERE ADDRES IS NULL​

​​

- 관계 연산자

NOT, AND, OR, BETWEEN, IN

SELECT * FROM MEMBERS WHERE AGE=20 OR AGE=21 OR AGE=22​

​SELECT * FROM MEMBERS WHERE 20 <= AGE AND AGE<=22

​SELECT * FROM MEMBERS WHERE 20 <= AGE AND AGE<=22

​SELECT * FROM MEMBERS WHERE AGE BETWEEN 20 AND 22

SELECT * FROM MEMBERS WHERE AGE IN (20, 25, 27)​

 

SELECT * FROM MEMBERS WHERE AGE NOT IN (20, 25, 27)​

- 패턴 연산자

LIKE, %, _​

 

​SELECT * FROM MEMBERS WHERE NAME = '박%'​

SELECT * FROM MEMBERS WHERE NAME LIKE '%박%'​​

SELECT * FROM MEMBERS WHERE NAME LIKE '박_'​​

'Database > Oracle' 카테고리의 다른 글

ROWNUM, 행 제한  (0) 2017.02.23
정규식  (0) 2017.02.23
제약조건  (0) 2017.02.23
SEQUENCE TABLE  (0) 2017.02.23
집계 함수  (0) 2017.02.23