[DB] SQL - 1
너나나
SQL 정리 SELECT: 무엇(어떤 열)을 가져올지 FROM: 어디서 가져올지 WHERE: 어떤 조건으로 필터링할 것인지 1) SELECT SELECT column1, column2, … FROM table_name; ex) SELECT CustomerName, City FROM Customers; SELECT 뒤에 DISTINCT를 넣으면 중복 제거 ex) SELECT DISTINCT City FROM Customers; SELECT COUNT(DISTINCT City) FROM Customers; SELECT COUNT(*) AS DistinctCountry FROM (SELECT DISTINCT Country FROM Customers); 2) WHERE ex) SELECT * FROM Custo..