MsSql »ç¿ëÁßÀÔ´Ï´Ù.
¿¹¸¦µé¾î ÇöÀç Ä®·³ÀÌ t1,t2°¡ Å×À̺í(test)¿¡ ÀÖ½À´Ï´Ù.
t1Àº intÇüÀÌ°í ±âº»Å°¿¡ Auto_increment Çϳª¾¿ Áõ°¡ÇÕ´Ï´Ù.
insert Äõ¸®¸¦ ³¯·Á¼
INSERT into test(t2) values('test1');
INSERT into test(t2) values('test2');
INSERT into test(t2) values('test3');
ÀÌ·¸°ÔÇϸé
t1|t2
----
1|test1
2|test2
3|test3
ÀÌ·¸°Ô µÇ´Â°ÍÀº È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
¹®Á¦´Â Å×ÀÌºí¿¡ Ä®·³ÀÌ »èÁ¦°¡ µÇ¸é auto_increment°¡ ÀçÁ¤ÀÇ µÇ°Ô ¼³Á¤ÇÏ´Â Æ®¸®°Å¸¦ ¸¸µé°í ½Í½À´Ï´Ù.
¸¸¾à delete from test where t1=2 ÀÌ Äõ¸®¸¦ ½ÇÇàÇϸé
testÅ×ÀÌºí¿¡´Â
t1|t2
----
1|test1
2|test3
ÀÌ·¸°Ô ÇÏ°í ½ÍÀºµ¥ ¹æ¹ýÀ» °¡¸£ÃÄÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù.
±¸±Û¸µ ÇغÁµµ °æÇèÀÌ ¾ø¾î¼ ´äÀ» ã±â°¡ ¸¹ÀÌ ¾î·Æ³×¿ä..¤Ð¤Ð | |
|