취미와 밥줄사이

[SQL] EXISTS 연산자 본문

DB

[SQL] EXISTS 연산자

취미와 밥줄사이 2021. 11. 1. 10:37

SQL EXISTS 연산자

EXISTS 연산자는 subquery에 레코드가 있는지 테스트하는 데 사용됩니다.

 

EXISTS 연산자는 subquery가 하나 이상의 레코드를 반환하는 경우 TRUE를 반환합니다.

 

EXISTS 문법

SELECT column_name(s)
FROM table_name
WHERE EXISTS
(SELECT column_name FROM table_name WHERE condition);

REFERENCE

https://www.w3schools.com/sql/sql_exists.asp

 

SQL EXISTS Operator

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

www.w3schools.com

 

'DB' 카테고리의 다른 글

[Python] MongoDB Sort  (0) 2021.11.03
[SQLAlchemy] SQLAlchemy이란?  (0) 2021.11.01
[SQL] HAVING 절  (0) 2021.11.01
[SQL] GROUP BY 문  (0) 2021.11.01
[SQL] UNION 연산자  (0) 2021.11.01