SQL SELECT
Β·
π Computer Science/β Database
SELECT [PREDICATE] [ν
μ΄λΈλͺ
.]μμ±λͺ
[AS λ³μΉ], ... FROM ν
μ΄λΈλͺ
[AS λ³μΉ], ... WHERE 쑰건 ORDER BY μμ±λͺ
[ASC | DESC], ... GROUP BY μμ±λͺ
, ... HAVING 쑰건; 1. SELECT μ 쑰건μ λ§λ ννμ κ²μνλ€. PREDICATE: λΆλ¬μ¬ νν μλ₯Ό μ νν λͺ
λ Ήμ΄λ₯Ό κΈ°μ νλ€. DISTINCT: μ€λ³΅λ ννμ΄ μμΌλ©΄ κ·Έμ€ μ²« λ²μ§Έ ν κ°λ§ κ²μνλ€ DISTINCT: μ€λ³΅λ ννμ μ κ±°νκ³ ν κ°λ§ κ²μνμ§λ§ μ νλ μμ±μ κ°μ΄ μλ νν μ 체λ₯Ό λμμΌλ‘ νλ€. κΈ°λ³Έ ν
μ΄λΈμ ꡬμ±νλ λͺ¨λ μμ±μ μ§μ ν λλ '*'λ₯Ό κΈ°μ νλ€. 2. ORDER BY μ νΉμ μμ±μ κΈ°μ€μΌλ‘ μ λ ¬νμ¬ κ²μν λ μ¬μ©νλ€. [ASC | DESC]:..