반응형
이럴 때가 있다. 칼럼이 categorical value를 가지고 있으며, 이 종류를 알고 싶을 때,
SQL에는 UNIQUE 혹은 DISTINCT를 사용한다.
SELECT DISTINCT column1, column2, ... FROM table_name;
참고자료
더보기
SQL SELECT DISTINCT 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
SQL UNIQUE Constraint
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] unique와 distinct의 차이
사실 오라클 DB를 사용하면서 두 예약어의 차이는 없다 결과도 같다. 단지 unique가 더 먼저 채택되어 사...
blog.naver.com
✔ 글이 도움이 되셨나요?
☺아래 광고를 눌러주시면 소리331이 더 좋은 퀄리티의 글을 연재하는데 큰 힘이 됩니다!☺
반응형
'기술스택을 쌓아보자 > SQL' 카테고리의 다른 글
[조각SQL] 칼럼 이름 바꾸기 rename column (0) | 2022.05.11 |
---|---|
TIL 2022 05 10 - sqlalchemy의 cascade, relationship [TODAY I LEARN] (0) | 2022.05.11 |
[조각SQL, DB] CASE 구문을 알아보자! (0) | 2021.11.27 |
[조각DB] DB 테이블 리스트 조회/테이블 칼럼(열) 검색하기 (0) | 2021.10.27 |
[mysql] 특정 값(목록 내의 값)을 골라 가져오기 WHERE IN 문법 (0) | 2020.09.21 |
댓글