[SQL] 기초 - 1

Robin·2023년 8월 28일

SQL

목록 보기
2/7

SQL: language for RDBMS

Semicolon
Semicolon is optional

  • Mandatory only in some RDBMS

Distinct
distinct + Select

  • Retrieve the unique values for the specified columns
  • for multiple columns : 합이 유니크 한것 (ex) Mexico+000 은 Mexico+001과 다른 값이다

Between with Text
A
C
E
D
B
Between B and D > 자동으로 Order By ASC 된 후 B, C, D가 출력

Wildcard Characters (w/ Like Operator)
% multi char
_ single char

Limit
SELECT * FROM [Customers] Limit 2, 6;
2번째 이후의 6개 가져오기

Built-in functions: Upper(), Lower(), Length() ...

DROP: 테이블을 삭제한다
TRUNCATE: 테이블을 초기화한다
-> 둘다 복구 할 수 없다

profile
Always testing, sometimes dog walking

0개의 댓글