WHERE phrase Conditions

유녜쥬·2024년 9월 27일

DB

목록 보기
6/9

COMPARE

= (equal)

<>, != (Not euqal)

<,<=,>,>= (해당하는 data 조회)

RANGE

BETWEEN (include =)

ex) (column) BETWEEN value1 AND value2
= (column) >= value1 AND <= value2

SET (집합)

IN

ex) (column) IN (value1, value2, ...)

NOT IN

ex) (column) NOT IN (value1, value2, ...)

PATTERN

LIKE

ex) (column) LIKE (pattern)
% : equal to 0 or more string
[] : equal to a string
[^] : not equal to a string
_ : equal to a string that is in particular location

NULL

IS NULL

ex) (column) IS NULL

IS NOT NULL

ex) (column) IS NOT NULL

COMPLEX CONDITION

AND

ex) (condition1) AND (condition2)

OR

ex) (condition1) OR (condition2)

NOT, !

ex) NOT (condition)

profile
Junior Backend Developer

0개의 댓글