English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

請問mysql的資料型態共有哪幾種呢?!
那各代表什麼意思?!
比如說有:
VARCHAR
CHAR
INT
我知道上面兩個是字串型態
不過有些都不知道差在哪裡?!
下面INT是數值型態
請問MYSQL全部的資料型態是哪些呢?!
有附註型態的嗎?!
日期型態有分有TIME和就日期的嗎?!
麻煩各位大大了~~謝謝!!!!

2007-03-20 07:40:06 · 1 個解答 · 發問者 菁怡 1 in 電腦與網際網路 程式設計

謝謝~~
附註型態就是有點像註解的型態
像現在我補充的話就可以打很多字
可以換行
還蠻難解釋的
就類似[註解]的樣子

2007-03-21 07:55:33 · update #1

1 個解答

1. Mysql Data Type 列表
TEXT TYPES
======
CHAR( ) A fixed section from 0 to 255 characters long.
VARCHAR( ) A variable section from 0 to 255 characters long.
TINYTEXT A string with a maximum length of 255 characters.
TEXT A string with a maximum length of 65535 characters.
BLOB A string with a maximum length of 65535 characters.
MEDIUMTEXT A string with a maximum length of 16777215 characters.
MEDIUMBLOB A string with a maximum length of 16777215 characters.
LONGTEXT A string with a maximum length of 4294967295 characters.
LONGBLOB A string with a maximum length of 4294967295 characters.


NUMBER TYPES
======
TINYINT( ) -128 to 127 normal
0 to 255 UNSIGNED.
SMALLINT( ) -32768 to 32767 normal
0 to 65535 UNSIGNED.
MEDIUMINT( ) -8388608 to 8388607 normal
0 to 16777215 UNSIGNED.
INT( ) -2147483648 to 2147483647 normal
0 to 4294967295 UNSIGNED.
BIGINT( ) -9223372036854775808 to 9223372036854775807 normal
0 to 18446744073709551615 UNSIGNED.
FLOAT A small number with a floating decimal point.
DOUBLE( , ) A large number with a floating decimal point.
DECIMAL( , ) A DOUBLE stored as a string , allowing for a fixed decimal point.


DATE TYPES
======
DATE YYYY-MM-DD.
DATETIME YYYY-MM-DD HH:MM:SS.
TIMESTAMP YYYYMMDDHHMMSS.
TIME HH:MM:SS.


MISC TYPES
======
ENUM ( ) Short for ENUMERATION which means that each column may have one of a specified possible values.
SET Similar to ENUM except each column may have more than one of the specified possible values.


2. char 儲存空間長度固定 varchar 儲存空間變動,隨資料而增加

3.何謂你說的附註型態?

4. 日期DATE 時間 TIME

2007-03-20 08:39:12 · answer #1 · answered by 醉愛翡翠珠寶精品 3 · 0 0

fedest.com, questions and answers