MYSQL
MYSQL ์์ ํ ์ด๋ธ ์์ฑ key์์ MUL ์ด ๋ญ๊น ์ฐพ๋ค๊ฐ...
๐ฉท ์ ๐งก
2008. 5. 16. 17:06
728x90
SMALL
MYSQL - ์ธ๋ฑ์ค๋ฅผ ์์ฑํ๋ ๋ฐฉ๋ฒ
์ธ๋ฑ์ค ํ์ผ์ "ํ
์ด๋ธ๋ช
.MY1" ํ์ผ๋ก DB๋๋ ํ ๋ฆฌ ์๋์ ์ฅ..
mysql>create table test1(
->var1 int not null auto_increment primary key,
->var2 int not null,
->var3 char(30) not null,
->index idx1(var1) <-- ์ธ๋ฑ์ค์ง์
->);
query OK, 0 rows affected(0.06 sec)
mysql>desc test1 <-- index๋ MUL๋ก ํ์๋๋ค.
mysql>show keys from test1; <-- key ๋ณผ ์ ์๋ค.
===================================================
mysql>create index idx1 on test1(var1);
query ok, 0 rows affected(0.25 sec)
Records: 0 duplicates: 0 warnings: 0
์ ๊ฑฐ๋ Drop index or alter table
MUL ์ด๋๊ฒ index๋ฅผ ๋ปํ๋ ๊ฑฐ์๊ตฌ๋.
728x90
LIST