´Ù¸¥ »çÀÌÆ®¿¡ ¿Ã¸° ±ÛÀε¥ Ȥ ¾Æ½Ã´Â ºÐ°è½Å°¡ ½Í¾î¼¿ä.
°¨»çÇÕ´Ï´Ù.
-----------------------------------------------------------------
mysql 4.0.25 ÀÔ´Ï´Ù. cafe24 JSPÈ£½ºÆÃÀÔ´Ï´Ù.
¾Æ·¡Ã³·³ test¶ó´Â tableÀ» ¸¸µé°í,
mysql> desc test;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| no | int(11) | | PRI | NULL | auto_increment |
| name | varchar(30) | | | | |
| age | int(3) | | | 0 | |
+-------+-------------+------+-----+---------+----------------+
ÀڷḦ ÀÔ·ÂÇÕ´Ï´Ù.
À¯½ÉÈ÷ ºÁ¾ßÇÒ ºÎºÐÀº 'È«±æµ¿ '°ú 'È«±æµ¿', ' È«±æµ¿ ' ÀÔ´Ï´Ù.
°ªÀÇ Ã³À½°ú ¸¶Áö¸·¿¡ ºóÄÀÌ ÀÖ°í, ¾ø°í Â÷ÀÌÀÔ´Ï´Ù.
mysql> insert into test values (null, 'È«±æµ¿ ', '20');
mysql> insert into test values (null, 'È«±æµ¿', '21');
mysql> insert into test values (null, ' È«±æµ¿ ', '22');
±×·±µ¥ insertÈÄ¿¡ °ªÀ» selectÇغ¸¸é
mysql> select no, name, length(name), age from test;
+----+---------+--------------+-----+
| no | name | length(name) | age |
+----+---------+--------------+-----+
| 1 | È«±æµ¿ | 6 | 20 |
| 2 | È«±æµ¿ | 6 | 21 |
| 3 | È«±æµ¿ | 7 | 22 |
+----+---------+--------------+-----+
¾Æ¸¶ °ªÀÇ Ã³À½ ºóÄÀº °ø¹éÀ» value·Î ó¸®ÇÏ°í,
°ªÀÇ ¸¶Áö¸· °ø¹éÀº ¾ø¾Ö°í ÀúÀåµÇ´Â °Í °°Àºµ¥,
ÀÔ·ÂÇß´Â °ª ±×´ë·Î ÀԷµǴ ¹æ¹ýÀÌ ¾øÀ»±î¿ä?
Á¦°¡ ¿øÇÏ´Â °ÍÀº ¾Æ·¡¿Í °°½À´Ï´Ù.
mysql> select no, name, length(name), age from test;
+----+---------+--------------+-----+
| no | name | length(name) | age |
+----+---------+--------------+-----+
| 1 | È«±æµ¿ | 7 | 20 |
| 2 | È«±æµ¿ | 6 | 21 |
| 3 | È«±æµ¿ | 8 | 22 |
+----+---------+--------------+-----+
ºÎµð ¹«ÁöÀÇ ÇѰ踦 ¹þ¾î³ª°Ô ºÎŹµå¸³´Ï´Ù.
¿©¸§ °Ç°È÷ º¸³»¼¼¿ä~
blob ³ª text ·Î Ä÷³¼Ó¼ºÀ» ¹Ù²Ù½Ã¸é µË´Ï´Ù.