SQL ์ ๋ฆฌ
๊ธฐ๋ณธ ๋ฐ์ดํฐ ์ ์ด
์ฝ์
insert into ํ
์ด๋ธ๋ช
(์์ฑ๋ช
๋ค...) values(๊ฐ๋ค...)
์์
update ํ
์ด๋ธ๋ช
set ์์ฑ๋ช
=๊ฐ, ... where ์กฐ๊ฑด๋ฌธ
์ญ์
delete from ํ
์ด๋ธ๋ช
where ์กฐ๊ฑด๋ฌธ
๊ฒ์
select ์์ฑ๋ช
... from ํ
์ด๋ธ๋ช
where ์กฐ๊ฑด๋ฌธ
ํ
์ด๋ธ ์์ฑ/์ญ์
create table ํ
์ด๋ธ๋ช
(...)
drop table ํ
์ด๋ธ๋ช
๋ฐ์ดํฐ๋ฒ ์ด์ค ์์ฑ/์ญ์
create database ๋๋น๋ช
drop database ๋๋น๋ช
ํ
์ด๋ธ์ ์์ฑ ์ถ๊ฐ/์ญ์
alter table ํ
์ด๋ธ๋ช
add ์์ฑ๋ด์ฉ...
alter table ํ
์ด๋ธ๋ช
drop column ์์ฑ๋ช
๋ณตํฉ ์กฐ๊ฑด๋ฌธ(if-else)
case //์์
when ์กฐ๊ฑด์ then ๋ฐํ์
when ์กฐ๊ฑด์ then ๋ฐํ์
...
else ๋ฐํ์
end //๋