본문 바로가기
  • 공부한 것들과 여러가지를 기록해요
SQL/공부

Codecademy - Queries

by 티권 2023. 2. 5.

 

  • A% matches all movies with names that begin with letter ‘A’
  • %a matches all movies that end with ‘a’

디폴트는 오름차순

리밋 맨 마지막에

가독성을 위해 들여쓰기 하는 게 좋음

sql의 if then 로직이라고 생각하면 됨

마지막에 end as 'mood'로 열 이름 설정 해줘야함.

 

  • SELECT is the clause we use every time we want to query information from a database.
  • AS renames a column or table.
  • DISTINCT return unique values.
  • WHERE is a popular command that lets you filter the results of the query based on conditions that you specify.
  • LIKE and BETWEEN are special operators.
  • AND and OR combines multiple conditions.
  • ORDER BY sorts the result.
  • LIMIT specifies the maximum number of rows that the query will return.
  • CASE creates different outputs

 

'SQL > 공부' 카테고리의 다른 글

select 문 총정리  (0) 2023.07.09
개념적 데이터 모델링, ERD  (0) 2023.02.07
Codecademy - Multiple Tables  (0) 2023.02.05
Codecademy - Aggregate Functions  (0) 2023.02.05
sql select문, join (생활코딩)  (0) 2023.02.04