SELECT <columns> FROM <table>;
SELECT <columns> FROM <table> LIMIT <int>;
// int개만 가지고옴
SELECT <columns> FROM <table> WHERE <조건>;
//조건에 맞는 결과만 가지고옴
SELECT <columns> FROM <table> WEHRE <조건> BETWEEN <범위1> AND <범위2>;
범위1과2사이의 조건에 맞는 데이터 가지고옴
SELECT <columns> FROM <table> WEHRE <조건> IN <범위1>;
범위1안의 데이터 중 조건에 맞는 데이터를 가지고옴
SELECT <columns> FROM <table> WEHRE <조건> IS NULL;
<조건>이 Null인 데이터 가지고옴
SELECT <columns> FROM <table> WEHRE <조건> IS NOT NULL;
<조건>이 NULL이 아닌데이터 출력
SELECT <columns> FROM <table> ORDER BY <colomn name> DESC;
데이터를 내림차순으로 정렬
SELECT DISTINCT <columns> FROM <table>;
결과에서 중복 행을 제거. 모든열의 조합에 적용
SELECT min(<columns>) FROM <table>;
최소값을 얻는다
SELECT max(<columns>) FROM <table>;
최대값을 얻는다
INSERT INTO <table> VALUES <value1, value2, value3> //table에 value1~3값을 넣음
INSERT INTO <table> <column1,column2> VALUES <value1, value2> //컬럼1,2에 value1,2를 넣음
UPDATE <table> SET <column1=value1, column2=value2> WHERE <조건> //조건에 해당하는 절 수정