취미와 밥줄사이

[SQL] HAVING 절 본문

DB

[SQL] HAVING 절

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

SQL HAVING 절

WHERE 키워드는 집계 함수와 함께 사용할 수 없기 때문에 HAVING 절이 SQL에 추가되었습니다.

HAVING 문법

SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
HAVING condition
ORDER BY column_name(s);

REFERENCE

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

 

SQL GROUP BY Statement

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' 카테고리의 다른 글

[SQLAlchemy] SQLAlchemy이란?  (0) 2021.11.01
[SQL] EXISTS 연산자  (0) 2021.11.01
[SQL] GROUP BY 문  (0) 2021.11.01
[SQL] UNION 연산자  (0) 2021.11.01
[SQL] Aliases  (0) 2021.11.01