www.rainshot.pe.kr

 

 

±Û¸ñ·Ï  HOME 

Á¦ ¸ñ
Column types (µ¥ÀÌÅÍÇü)
³» ¿ë
------------------------------------------------------------------------------------
<¼ýÀÚŸÀÔ> 
 tinyint    smallint     mediumint     int        bigint     float      double
 1¹ÙÀÌÆ®    2¹ÙÀÌÆ®      3¹ÙÀÌÆ®       4¹ÙÀÌÆ®    8¹ÙÀÌÆ®    4¹ÙÀÌÆ®    8¹ÙÀÌÆ®
 

<³¯Â¥,½Ã°£ Å¸ÀÔ> 
 date       time       datetime    timestamp      year
 3¹ÙÀÌÆ®    3¹ÙÀÌÆ®    8¹ÙÀÌÆ®     4¹ÙÀÌÆ®        1¹ÙÀÌÆ®  
 

<¹®ÀÚ¿­ Å¸ÀÔ> 
 char(X)          varchar(X)            text
 X°³ÀÇ ¹®ÀÚ       ÃÖ´ë X°³ÀÇ ¹®ÀÚ       ÃÖ´ë 65535°³ÀÇ ¹®ÀÚ  
 

³¯Â¥, ½Ã°£ Å¸ÀÔ¿¡¼­ date, time, datetime, timestamp´Â
°¢°¢ 'YYYY-MM-DD', 'HH:MM:SS', 'YYYY-MM-DD HH:MM:SS', 'YYYYMMDDHHMMSS'°ú
°°Àº ÇüÅ·ΠǥÇöµÈ´Ù. 

¹®ÀÚ¿­ Å¸ÀÔ Áß char(X)¿Í varchar(X)´Â ÀúÀå½Ã Â÷ÁöÇϴ ¿ë·®¿¡¼­ Â÷ÀÌ°¡ ÀÖ´Ù.
¿¹¸¦ µé¾î char(3), varchar(3)À¸·Î ¼±¾ðÇÏ°í 1¹ÙÀÌÆ® ¿ë·® ¸¸Å­ÀÇ ¹®ÀÚ¿­À» °¢°¢
ÀúÀåÇÒ °æ¿ì, char(3)Àº °íÁö½ÄÇÏ°Ô 3¹ÙÀÌÆ®¸¦ ´Ù ¶±~ÇÏ´Ï Â÷ÁöÇϴ ¹Ý¸é¿¡
varchar(3)´Â ¾ç½ÉÀûÀ¸·Î 1¹ÙÀÌÆ®¸¸À» Â÷ÁöÇÑ´Ù. ÇѸ¶µð·Î varchar(X)¸¸ ¾²¸é µÈ´Ù.
_______________________________________________________________________________ 


TINYINT :ºÎÈ£Àִ ¼ö´Â -128¿¡¼­ 127±îÁö, ºÎÈ£ ¾ø´Â ¼ö´Â 0¿¡¼­ 255±îÁö Ç¥ÇöÇÒ
¼ö ÀÖ´Ù. 1 ¹ÙÀÌÆ®

SMALLINT : ºÎÈ£Àִ ¼ö´Â -32768¿¡¼­ 32767±îÁö, ºÎÈ£ ¾ø´Â ¼ö´Â 0¿¡¼­ 65535±îÁö
Ç¥ÇöÇÒ ¼ö ÀÖ´Ù. 2 ¹ÙÀÌÆ®

MEDIUMINT : ºÎÈ£Àִ ¼ö´Â -8388608ºÎÅÍ 8388607±îÁö, ºÎÈ£¾ø´Â ¼ö´Â
 0¿¡¼­ 16777215±îÁöÀÇ ¼ö¸¦ Ç¥ÇöÇÒ ¼ö ÀÖ´Ù. 3 ¹ÙÀÌÆ®

INT : ºÎÈ£Àִ ¼ö´Â -2147483648ºÎÅÍ 2147483647±îÁö, ºÎÈ£¾ø´Â ¼ö´Â
0¿¡¼­ 4294967295±îÁöÀÇ ¼ö¸¦ Ç¥ÇöÇÒ ¼ö ÀÖ´Ù. 4 ¹ÙÀÌÆ®

INTEGER : INT¿Í °°´Ù.

BIGINT :
ºÎÈ£Àִ ¼ö´Â -9223372036854775808ºÎÅÍ 9223372036854775807±îÁöÀÇ ¼ö¸¦ Ç¥ÇöÇÒ ¼ö ÀÖ°í,
ºÎÈ£¾ø´Â ¼ö´Â 0ºÎÅÍ 18446744073709551615±îÁö Ç¥ÇöÇÒ ¼ö ÀÖ´Ù. 8¹ÙÀÌÆ®

****************************************************************************
FLOAT : ´ÜÀÏ Á¤¹Ðµµ¸¦ °¡Áø ºÎµ¿ ¼Ò¼öÁ¡À» ³ªÅ¸³½´Ù. ¾ðÁ¦³ª ºÎÈ£ Àִ ¼öÀÌ°í,
-3.402823466E+38ºÎÅÍ 3.402823466E+38±îÁöÀÇ ¼ö¸¦ Ç¥ÇöÇÒ ¼ö ÀÖ´Ù.

=>±×³É float·Î ÁöÁ¤ÇÏ°í 12345678901234567890 °ª(20ÀÚ¸®)¸¦ ÀÔ·ÂÇϸé
  1.23457e19 ·Î ÀúÀåÇÑ´Ù. Áï 1ÀÚ¸®.5ÀÚ¸® Çü½ÄÀ¸·Î ÀúÀåµÊ(¸¶Áö¸·ÀÚ¸® ¹Ý¿Ã¸²)
  
  float(5,5)·Î ÁöÁ¤ÇÏ°í 123456789.123456789 °ªÀ» ÀÔ·ÂÇϸé
  123456792.00000 ·Î ÀúÀåµÊ
  
  À§¿¡¼­ µç 3.402823466 ÀÚ¸®º¸´Ù 2ÀÚ¸®Á¤µµ ÀÛÀº ÀÚ¸®³»ÀÇ ¼ýÀÚ »ç¿ëÇϴ °æ¿ì
  »ç¿ëÇϴ °Ô ¾ÈÀüÇÒ µí.

 ________________________________________________________________________
 ¡Ú¡Ù Æ¯È÷, ±âÁ¸ÀÇ Ä®·³ÀÇ µ¥ÀÌÅ͠ŸÀÔÀ» alter ¸í·ÉÀ¸·Î ¹Ù²Ù´Â °æ¿ì À̹̠
      ÀúÀåµÈ °ªµµ ¿µÇâÀ» ¹Þ¾Æ ¾û¶×ÇÑ ¼ö·Î º¯ÇÏ´Ï ÁÖÀÇ ÇÏ¿©¾ß
 ________________________________________________________________________
*****************************************************************************



DOUBLE : 2¹è Á¤¹Ðµµ¸¦ °¡Áø ºÎµ¿ ¼Ò¼öÁ¡ ¼öÀÌ´Ù. ¾ðÁ¦³ª ºÎÈ£Àִ ¼öÀÌ°í,
-1.79769313486231517E+308ºÎÅÍ 1.7976931348623157E+308±îÁöÀÇ ¼ö¸¦ Ç¥ÇöÇÒ ¼ö ÀÖ´Ù.

DATE :
³¯Â¥¸¦ Ç¥ÇöÇϴ ŸÀÔÀ¸·Î ¡®1000-01-01¡¯ºÎÅÍ ¡®9999-12-31¡¯±îÁö¸¦ ³ªÅ¸³¾ ¼ö ÀÖ´Ù. 
3 ¹ÙÀÌÆ®

DATETIME : ³¯Â¥¿Í ½Ã°£À» °°ÀÌ ³ªÅ¸³»´Â Å¸ÀÔÀÌ´Ù. ¡®1000-01-01 00:00:00¡¯ºÎÅÍ 
¡®9999-12-31 23:59:59¡¯±îÁö ³ªÅ¸³¾ ¼ö ÀÖ´Ù. 8 ¹ÙÀÌÆ®

TIMESTAMP : ¡®1970-01-01 00:00:00¡¯ºÎÅÍ 2037³â±îÁö ³ªÅ¸³¾ ¼ö ÀÖ´Ù.4¹ÙÀÌÆ®

TIME : ½Ã°£À» ³ªÅ¸³½´Ù. ¡®-839:59:59¡¯ºÎÅÍ ¡®838:59:59¡¯±îÁö ³ªÅ¸³¾ ¼ö ÀÖ´Ù.

YEAR : ³âµµ¸¦ ³ªÅ¸³½´Ù. 1901³âºÎÅÍ 2155³â, 0000³âÀ» ³ªÅ¸³¾ ¼ö ÀÖ´Ù.

CHAR(M) : °íÁ¤ ±æÀ̸¦ °®´Â ¹®ÀÚ¿­À» ÀúÀåÇÒ ¼ö ÀÖ´Ù. MÀº 1ºÎÅÍ255±îÁöÀÌ´Ù.
MÀÌ 20À̸é 20°³ÀÇ ¹®ÀÚ¸¦ ÀúÀåÇÒ ¼ö ÀÖ´Ù.

VARCHAR(M) : CHAR´Â °íÁ¤±æÀÌÀΠ¹Ý¸é VARCHAR´Â °¡º¯ ±æÀÌÀÌ´Ù.
¿¹¸¦ µé¾î VARCHAR(20)ÀΠÄ÷³¿¡ 10ÀÚ¸¸ ÀúÀåÀ» Çϸé, ½ÇÁ¦·Îµµ 10ÀÚ ¸¸Å­À»
±â¾ïÀå¼Ò¸¦ Â÷ÁöÇÑ´Ù. ÇÏÁö¸¸, CHAR´Â ³ª¸ÓÁö 10ÀÚ¸¦ °ø¹éÀ¸·Î ¸Þ²Û´Ù.

TINYBLOB 
TINYTEXT : 255°³ÀÇ ¹®ÀÚ¸¦ ÀúÀåÇÒ ¼ö ÀÖ´Ù. BLOBÀº BINARY LARGE OBJECTÀÇ ¾àÀÚÀÌ´Ù.

BLOB
TEXT : 65535°³ÀÇ ¹®ÀÚ¸¦ ÀúÀåÇÒ ¼ö ÀÖ´Ù.

MEDIUMBLOB
MEDIUMTEXT : 16777215°³ÀÇ ¹®ÀÚ¸¦ ÀúÀåÇÒ ¼ö ÀÖ´Ù.

LONGBLOB
LONGTEXT : 4294967295(4±â°¡)°³ÀÇ ¹®ÀÚ¸¦ ÀúÀåÇÒ ¼ö ÀÖ´Ù. 
¹®ÀÚ¿­Àº ÀÛÀº µû¿ÈÇ¥(¡®)³ª Å« µû¿ÈÇ¥(¡°)·Î ¹­ÀδÙ.








___________________________________________________________________________________
¶ó°í ³ª¿ÍÀÖÁÒ. ¿©±â¼­ int(5) ´Â no ¸¦ ¼ýÀÚÇüÀ¸·Î ¼±¾ðÇϸç ÀÌ°ÍÀÇ ±æÀ̴ ÃÖ°í 5ÀÚ
¸®¶ó°í ÇØÁÖ´Â
°Ì´Ï´Ù. Áï no ¿¡´Â ÃÖ°í 99999 ¹ø±îÁö ÀÔ·ÂÀÌ µÇÁÒ. ¸¸¾à 100000 ¹øÀÌ µé¾î°¡¸é 
overflow
(³Ñħ)ÀÌ ÀϾÁÒ. (¾î¶² ÀÏÀÌ »ý±â´õ¶ó. ±ÜÀû)
=> Ä®·³À» int(4)·Î ÁöÁ¤ÇÏ°í ÀÔ·ÂÀ» Çصµ 4ÀÚÀÌ»ó ÀԷµÊ, intÇüÀÇ 
   ÇÑ°èÀΠ2147483647±îÁö ÀԷµʠ//³»°¡(ÃÖ) È®ÀÓÃc
int(11)Àº 11ÀÚ¸®ÀÇ Á¤¼öÇü Å¸ÀÔ´Õ´Ï´Ù. 
varchar(20)Àº 20Ä­Â¥¸® ¹®ÀÚ¿­À̶ó´Â °Å±¸¿ä.

C ¾ð¾î¿¡¼­ ¼ýÀڴ 2byte¸¦ ±âº»À¸·Î »ç¿ëÇÑ´Ù. 2¹ÙÀÌÆ®´Â 16 ºñÆ®Àε¥ Ã³À½ ºñÆ®´Â 
ºÎÈ£¸¦ ³ªÅ¸³»¹Ç·Î Ç¥ÇöÇÒ ¼ö Àִ ÃÖ´ë ¼ýÀڴ ±îÁö Ç¥½ÃÇÒ ¼ö ÀÖ´Ù. 65,535 º¸´Ù 
Å« ¼ö´Â 4¹ÙÀÌÆ®ÀÇ ¸Þ¸ð¸®¸¦ »ç¿ëÇϸç, 65536*65536=4,294,967,296 ±îÁö Ç¥½ÃÇÒ ¼ö ÀÖ
´Ù. ¼ýÀÚ¸¦ ºÎµ¿ ¼Ò¼öÁ¡(float point ½Ç¼ö)À¸·Î Ç¥ÇöÇÒ °æ¿ì 4¹ÙÀÌÆ®¸¦ ÀÌ¿ëÇϸ頱î
Áö Ç¥ÇöÇÒ ¼ö ÀÖ´Ù.
ÄÄÇ»ÅÍ°¡ ¼ýÀÚ¸¦ ±â¾ïÇÒ ¶§ 2¹ÙÀÌÆ®(16ºñÆ®)¸¦ »ç¿ëÇÑ´Ù. ÃÖ»óÀ§ ºñÆ®´Â ºÎÈ£ ºñÆ®ÀÌ
´Ù.
À§¿Í °°ÀÌ ÃÖ»óÀ§ ºñÆ®°¡ 0À̸頾ç¼ö¸¦ 1À̸é À½¼ö¸¦ ³ªÅ¸³½´Ù.



Type                     Option   (B)-ÃÖ´ëÇ¥½Ã, (F)-¼Ò¼öÁ¡ÀÌÇÏÀÚ¸´¼ö
--------------------------------------------------------------------------------
TINYINT                  Á¤¼öÇü(-128~127), (B), [UNSIGNED]-Á¤¼öÇü(0~255)
        
SMALLINT                 Á¤¼öÇü(-32768~32767), (B), [UNSIGNED]-Á¤¼öÇü(0~65535)
        
MEDIUMINT                Á¤¼öÇü(-8388606~8388607), (B), [UNSIGNED]-Á¤¼öÇü
(0~16777215)
        
INT                      Á¤¼öÇü(-2147483648~2147483647), (B), [UNSIGNED]-Á¤¼öÇü
(0~4294967295)
        
INTEGER                  INT¿Í µ¿ÀÏ
        
BIGINT                   Á¤¼öÇü(-9223372036854775808~9223372036854775807), (B),
                         [UNSIGNED]-Á¤¼öÇü(0~18446744073709551615)

FLOAT(Á¤¹Ðµµ)            ºÎµ¿¼Ò¼öÁ¡½Ç¼ö, (Á¤¹Ðµµ)-"(4,8)", (4)-´ÜÁ¤µµ
                         ºÎµ¿¼Ò¼öÁ¡½Ç¼ö, (8)-¹èÁ¤µµ ºÎµ¿¼Ò¼öÁ¡½Ç¼ö, ¹üÀ§´Â 
FLOAT, DOUBLE°ú °°½À´Ï´Ù.
                                                         
FLOAT(L, F)              ´ÜÁ¤µµ ºÎµ¿¼Ò¼öÁ¡ ½Ç¼ö, (B,F), (-3.402823466E+38 ~ 
1.175494351E-38, 0,
                                                          1.175494351E-38 ~ 
3.402823466E+38)
DOUBLE                   ¹èÁ¤µµ ºÎµ¿¼Ò¼öÁ¡ ½Ç¼ö, (B,F), (-
1.7976931348623157E+308 ~ -2.2250738585072014E-308,0,
                                                          2.2250738585072014E-
308 ~ 1.7976931348623157E+308)
        
DOUBLE PRECISION~REAL    PRECISION(B,F), REAL(B,F) DOUBLE¿Í µ¿ÀÏ
        
DECIMAL                  ºÎµ¿ ¼Ò¼öÁ¡ ½Ç¼ö CHAR ÇüÅ·Πµ¿ÀÛ, (B,F), F°¡ 0À̸頼Ò
¼öÁ¡ÀÌÇϴ ÀúÀåµÇÁö ¾Ê½À´Ï´Ù.
                         ¹üÀ§´Â DOUBLE¿Í °°½À´Ï´Ù.
        
NUMERIC                  ECIMAL°ú µ¿ÀÏ
        
DATE                     ³¯Â¥Çü(1000-01-01 ~ 9999-12-31) 
                         ±âº»Å¸ÀÔ - YYYY-MM-DD
        
DATETIME                 ³¯Â¥¿Í ½Ã°£Çü(1000-01-01 00:00:00 ~ 9999-12-31 
23:59:59)
                         ±âº»Å¸ÀÔ - YYYY-MM-DD HH:MM:SS 
        
TIMESTAMP                Å¸ÀÓ½ºÅÛÇÁÇü(1970-01-01 ~ 2037³â ÀÓÀÇ ½Ã°£),
                         (B) - (14,12,8,6) B °ªÀÌ ¾øÀ» °æ¿ì INSERT, UPDATE½Ã µ¿
À۵Ƞ½Ã°£À¸·Î ÀÚµ¿ÀûÀ¸·Î ÀúÀåµË´Ï´Ù.
                         ±âº»Çü½Ä - YYYYMMDDHHMMSS, YYMMDDHHMMSS, 
YYYYMMDD,YYMMDD
        
TIME                     ½Ã°£Çü(-838:59:59 ~ 838:59:59) ±âº»Çü½Ä - HH:MM:SS
        
YEAR                     ³âµµÇü(1901 ~ 2155, 0000)
        
CHAR                     °íÁ¤Æø ¹®ÀÚ¿­, (B) - (1~255) B ¸¸Å­ ¿À¸¥ÂÊÀ¸·Î °ø¹é Ã¤
¿ö ÀúÀå Ãâ·Â ½Ã °ø¹éÀº Ãâ·Â¾ÈµÊ, 
                         [BINARY] - °Ë»ö ½Ã ´ë¼Ò¹®ÀÚ ±¸ºÐ
        
VARCHAR                  °¡º¯Æø ¹®ÀÚ¿­, (L) - (1 ~ 255) ¹®ÀÚ¿­ °ø¹éÀÌ Á¦°ÅµÈ ÈÄ 
ÀúÀå,
                         [BINARY] - °Ë»ö ½Ã ´ë¼Ò¹®ÀÚ ±¸ºÐ
        
TINYBLOB / TINYTEXT      BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 255¹®ÀÚ  
        
BLOB / TEXT              BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 65535¹®ÀÚ
        
MEDIUMBLOB / MEDIUMTEXT  BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 16777215¹®ÀÚ
        
LONGBLOB / LONGTEXT      BOLB, TEXTÇü, ÃÖ´ë±æÀÌ 4294967295¹®ÀÚ
        
ENUM                     ¹®ÀÚ¿­ ¸ñ·ÏÇü, ÃÖ´ë 65535°³, ÀúÀåµÈ ¹®ÀÚ¿­ ¸ñ·Ï Áß¿¡ ¿À
Á÷ ÇÑ°¡Áö¸¸ ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.
        
SET                      ¹®ÀÚ¿­ ¸ñ·ÏÇü, ÃÖ´ë 64°³, ÀúÀåµÈ ¹®ÀÚ¿­ ¸ñ·Ï Áß¿¡ 0, 1
°³ ÀÌ»óÀ» ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.


============
Column types
============

*MySQL* supports a number of column types, which may be grouped into
three categories: numeric types, date and time types, and string
(character) types.  This section first gives an overview of the types
available and summarizes the storage requirements for each column type,
then provides a more detailed description of the properties of the
types in each category.  The overview is intentionally brief.  The more
detailed descriptions should be consulted for additional information
about particular column types, such as the allowable formats in which
you can specify values.

The column types supported by *MySQL* are listed below.  The following
code letters are used in the descriptions:

`M'
     Indicates the maximum display size.  The maximum legal display
     size is 255.

`D'
     Applies to floating-point types and indicates the number of digits
     following the decimal point.  The maximum possible value is 30, but
     should be no greater than `M'-2.

Square brackets (`[' and `]') indicate parts of type specifiers that
are optional.

Note that if you specify `ZEROFILL' for a column, *MySQL* will
automatically add the `UNSIGNED' attribute to the column.

`TINYINT[(M)] [UNSIGNED] [ZEROFILL]'
     A very small integer. The signed range is `-128' to `127'. The
     unsigned range is `0' to `255'.

`SMALLINT[(M)] [UNSIGNED] [ZEROFILL]'
     A small integer. The signed range is `-32768' to `32767'. The
     unsigned range is `0' to `65535'.

`MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]'
     A medium-size integer. The signed range is `-8388608' to
     `8388607'. The unsigned range is `0' to `16777215'.

`INT[(M)] [UNSIGNED] [ZEROFILL]'
     A normal-size integer. The signed range is `-2147483648' to
     `2147483647'.  The unsigned range is `0' to `4294967295'.

`INTEGER[(M)] [UNSIGNED] [ZEROFILL]'
     This is a synonym for `INT'.

`BIGINT[(M)] [UNSIGNED] [ZEROFILL]'
     A large integer. The signed range is `-9223372036854775808' to
     `9223372036854775807'. The unsigned range is `0' to
     `18446744073709551615'.  Note that all arithmetic is done using
     signed `BIGINT' or `DOUBLE' values, so you shouldn't use unsigned
     big integers larger than `9223372036854775807' (63 bits) except
     with bit functions!  Note that `-', `+' and `*' will use `BIGINT'
     arithmetic when both arguments are `INTEGER' values!  This means
     that if you multiply two big integers (or results from functions
     that return integers) you may get unexpected results if the result
     is larger than `9223372036854775807'.

`FLOAT(precision) [ZEROFILL]'
     A floating-point number. Cannot be unsigned.  `precision' can be
     `<=24' for a single precision floating point number and between 25
     and 53 for a double precision floating point number.  these types
     are like the `FLOAT' and `DOUBLE' types described immediately
     below. `FLOAT(X)' have the same ranges as the corresponding
     `FLOAT' and `DOUBLE' types, but the display size and number of
     decimals is undefined.

     In *MySQL* 3.23, this is a true floating point value.  In earlier
     *MySQL* versions, `FLOAT(precision)' always has 2 decimals.

     This syntax is provided for ODBC compatibility.

`FLOAT[(M,D)] [ZEROFILL]'
     A small (single-precision) floating-point number. Cannot be
     unsigned.  Allowable values are `-3.402823466E+38' to
     `-1.175494351E-38', `0' and `1.175494351E-38' to
     `3.402823466E+38'.  The M is the display width and D is the number
     of decimals.  `FLOAT' without an argument or with an argument of
     <= 24 stands for a single-precision floating point number.

`DOUBLE[(M,D)] [ZEROFILL]'
     A normal-size (double-precision) floating-point number. Cannot be
     unsigned. Allowable values are `-1.7976931348623157E+308' to
     `-2.2250738585072014E-308', `0' and `2.2250738585072014E-308' to
     `1.7976931348623157E+308'.  The M is the display width and D is
     the number of decimals.  `DOUBLE' without an argument or
     `FLOAT(X)' where 25 <= X <= 53 stands for a double-precision
     floating point number.

`DOUBLE PRECISION[(M,D)] [ZEROFILL]'
`REAL[(M,D)] [ZEROFILL]'
     These are synonyms for `DOUBLE'.

`DECIMAL[(M[,D])] [ZEROFILL]'
     An unpacked floating-point number.  Cannot be unsigned.  Behaves
     like a `CHAR' column: "unpacked" means the number is stored as a
     string, using one character for each digit of the value.  The
     decimal point, and, for negative numbers, the `-' sign is not
     counted in M.  If `D' is 0, values will have no decimal point or
     fractional part.  The maximum range of `DECIMAL' values is the
     same as for `DOUBLE', but the actual range for a given `DECIMAL'
     column may be constrained by the choice of `M' and `D'.

     If `D' is left out it's set to 0. If `M' is left out it's set to
     10.

     Note that in *MySQL* 3.22 the `M' argument includes the sign and
     the decimal point.

`NUMERIC(M,D) [ZEROFILL]'
     This is a synonym for `DECIMAL'.

`DATE'
     A date.  The supported range is `'1000-01-01'' to `'9999-12-31''.
     *MySQL* displays `DATE' values in `'YYYY-MM-DD'' format, but
     allows you to assign values to `DATE' columns using either strings
     or numbers.

`DATETIME'
     A date and time combination.  The supported range is `'1000-01-01
     00:00:00'' to `'9999-12-31 23:59:59''.  *MySQL* displays
     `DATETIME' values in `'YYYY-MM-DD HH:MM:SS'' format, but allows you
     to assign values to `DATETIME' columns using either strings or
     numbers.

`TIMESTAMP[(M)]'
     A timestamp.  The range is `'1970-01-01 00:00:00'' to sometime in
     the year `2037'.  *MySQL* displays `TIMESTAMP' values in
     `YYYYMMDDHHMMSS', `YYMMDDHHMMSS', `YYYYMMDD' or `YYMMDD' format,
     depending on whether `M' is `14' (or missing), `12', `8' or `6',
     but allows you to assign values to `TIMESTAMP' columns using
     either strings or numbers.  A `TIMESTAMP' column is useful for
     recording the date and time of an `INSERT' or `UPDATE' operation
     because it is automatically set to the date and time of the most
     recent operation if you don't give it a value yourself.  You can
     also set it to the current date and time by assigning it a `NULL'
     value.  *Note Date and time types::.

`TIME'
     A time.  The range is `'-838:59:59'' to `'838:59:59''.  *MySQL*
     displays `TIME' values in `'HH:MM:SS'' format, but allows you to
     assign values to `TIME' columns using either strings or numbers.

`YEAR[(2|4)]'
     A year in 2- or 4- digit formats (default is 4-digit).  The
     allowable values are `1901' to `2155', and `0000' in the 4 year
     format and 1970-2069 if you use the 2 digit format (70-69).
     *MySQL* displays `YEAR' values in `YYYY' format, but allows you to
     assign values to `YEAR' columns using either strings or numbers.
     (The `YEAR' type is new in *MySQL* 3.22.)

`[NATIONAL] CHAR(M) [BINARY]'
     A fixed-length string that is always right-padded with spaces to
     the specified length when stored. The range of `M' is 1 to 255
     characters.  Trailing spaces are removed when the value is
     retrieved. `CHAR' values are sorted and compared in
     case-insensitive fashion according to the default character set
     unless the `BINARY' keyword is given.

     `NATIONAL CHAR' (short form `NCHAR') is the ANSI SQL way to define
     that a CHAR column should use the default CHARACTER set.  This is
     default in `MySQL'.

     `CHAR' is a shorthand for `CHARACTER'.

     *MySQL* allows you to create a column of type `CHAR(0)'. This is
     mainly useful when you have to be compliant with some old
     applications that depend on the existence of a column but that do
     not actually use the value.  This is also quite nice when you need
     a column that only can take 2 values: A `CHAR(0)', that is not
     defined as `NOT NULL', will only occupy one bit and can only take
     2 values: `NULL' or `""'.

`[NATIONAL] VARCHAR(M) [BINARY]'
     A variable-length string.  Note: Trailing spaces are removed when
     the value is stored (this differs from the ANSI SQL
     specification). The range of `M' is 1 to 255 characters.
     `VARCHAR' values are sorted and compared in case-insensitive
     fashion unless the `BINARY' keyword is given. *Note Silent column
     changes::.

     `VARCHAR' is a shorthand for `CHARACTER VARYING'.

`TINYBLOB'
`TINYTEXT'
     A `BLOB' or `TEXT' column with a maximum length of 255 (2^8 - 1)
     characters. *Note Silent column changes::.

`BLOB'
`TEXT'
     A `BLOB' or `TEXT' column with a maximum length of 65535 (2^16 - 1)
     characters. *Note Silent column changes::.

`MEDIUMBLOB'
`MEDIUMTEXT'
     A `BLOB' or `TEXT' column with a maximum length of 16777215 (2^24
     - 1) characters. *Note Silent column changes::.

`LONGBLOB'
`LONGTEXT'
     A `BLOB' or `TEXT' column with a maximum length of 4294967295
     (2^32 - 1) characters. *Note Silent column changes::.

`ENUM('value1','value2',...)'
     An enumeration.  A string object that can have only one value,
     chosen from the list of values `'value1'', `'value2'', `...', or
     `NULL'.  An `ENUM' can have a maximum of 65535 distinct values.

`SET('value1','value2',...)'
     A set.  A string object that can have zero or more values, each of
     which must be chosen from the list of values `'value1'',
     `'value2'', `...' A `SET' can have a maximum of 64 members.


./admin_reply.php?no=38&mode=reply (ȸ½ÅÇϱâ)                                               ±Û¼öÁ¤Çϱâ