µ¥ÀÌÅÍ º£À̽º ¸ñ·Ï º¸±â - Äõ¸®´Â ;·Î ³¡À» ¾Ë¸®¸ç, ´ë¼Ò¹®ÀÚ¸¦ °¡¸®Áö ¾Ê´Â´Ù.
mysql> show databases ;
mysql> show tables;
µ¥ÀÌÅÍ º£À̽º ¸¸µé±â/»èÁ¦Çϱâ
mysql> create database database¸í;
mysql> drop database database¸í;
Å×ÀÌºí ¸¸µé±â/»èÁ¦Çϱâ/±¸Á¶ È®ÀÎ
mysql> use database¸í;
mysql> create table table¸í(
name varchar(10),
math int
);
mysql> drop table table¸í;
mysql> desc table¸í;
Å×À̺íÀÇ Ä÷³ Ãß°¡/»èÁ¦/º¯°æ
Ãß°¡: alter table Å×À̺í À̸§ add Ä÷³À̸§°ú µ¥ÀÌÅÍ Å¸ÀÔ
»èÁ¦ : alter table Å×À̺í À̸§ drop Ä÷³À̸§.
º¯°æ : alter table Å×À̺í À̸§ change ±âÁ¸Ä÷³À̸§ º¯°æÇÒ Ä÷³À̸§°ú µ¥ÀÌÅÍ Å¸ÀÔ.
·¹ÄÚµåÀÇ Ãß°¡/»èÁ¦/ÃßÃâ/¾÷µ¥ÀÌÆ®
Ãß°¡ : insert into Å×À̺í À̸§(Ä÷³À̸§, Ä÷³À̸§2) values('°ª', '°ª1')
»èÁ¦ : delete from Å×À̺í À̸§/ delete from Å×À̺í À̸§ where Á¶°Ç
ÃßÃâ : select Ä÷³À̸§,Ä÷³À̸§2 from Å×À̺í¸í /select Ä÷³À̸§,Ä÷³À̸§2 from Å×À̺í¸í where Á¶°Ç.
¾÷µ¥ÀÌÆ® : update Å×À̺íÀ̸§ set Ä÷³À̸§=¼öÁ¤ÇÒ °ª where Á¶°ÇÀý
| |