博客列表 >navicat设计表字段数据类型长度与说明

navicat设计表字段数据类型长度与说明

左手Leon的博客
左手Leon的博客原创
2019年03月22日 11:37:129128浏览

navicat设计表

栏位类型


整形                                           字节                            范围

tinyint                                          1                         -128-127 0-255

smallint                                        2                         -32768-32767 0-65535

mediumint                                   3                         -8388608-8388607    16777215

int                                                4                         -2147483648-2147483647 0-4294967295

integer                                         4                         -2147483648-2147483647 0-4294967295 mysql中同int

bigint                                           8                          -9223372036854775808-9223372036854775807

bit                                                 1                         二进制数据


实数

real 8

double 8

float 4

decimal 16

numberic 16


字符

char                                             1~255                    固定长度

varchar                                        1~255                   根据内容调整空间,可节省空间


时间

date

time

year

timestamp

datetime


二进制对象

tinyblob                                          255

blob                                                65K

mediumblob                                   16M

longblob                                         4G


文本

tinytext                                          255

text                                                65K                             2^31-1

mediumtext                                  16M

longtext                                         4G


枚举

enum                                             2                              0-65535 单选

set                                                 5bit                          0-64    复选


二进制数据

binary                                          1-8000                      固定长度数据 

varbinary                                      1-8000                      空间为n+4个字节

point

linestring

polygon

geometry

multipoint

multilinestring

multipolygon

geometrycollection

参考此文章,列举更详细-SQL数据库常用字段数据类型说明

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议