MySQL AND, OR, NOT 연산자

MySQL AND, OR, NOT 연산자

MySQL AND, OR, NOT 연산자에 대해 설명하는 페이지입니다.

Environment

  • MySQL v8.0.34

목차

MySQL AND, OR, NOT 연산자

설명

AND, OR, NOT 연산자는 WHERE절에서 여러 개의 조건을 사용하거나, 조건이 false일 때 데이터를 필터링하고 싶을 때 사용한다.

문법

  • AND
    select column1, column2, ... from table_name where condition1 and condition2 and condition3 ...;
    
  • OR
    select column1, column2, ... from table_name where condition1 or condition2 ...;
    
  • NOT
    select column1, column2, ... from table_name where not condition;
    

Comments