SQL中的五种数据类型

ε祈祈猫儿з 提交于 2020-02-25 08:25:01


1.字符型:
sql-92: char,varchar
mysql:char,varchar & & binary,varbinary
mssql: char,varchar & nchar,nvarchar & binary,varbinary
oracle: char, varchar2(varchar), raw, nchar, nvarchar2,
注:varchar,raw必须设定大小

2.文本型
mysql: tinytext, text, mediumtext, and longtext   & tinyblob, blob, mediumblob, and longblob
mssql:  text & ntext & image
oracle: long, long raw, clob, nlob, blob, bfile
3.数值型
3.1整数int
   sql-92: int, smallint
   mysql: tinyint, smallint, mediumint, int, bigint
      mssql:  tinyint, smallint, int, bigint
       oracle:
3.2小数numeric
   sql-92: numeric, float, real(double precision)
   mysql:float, double, decimal(dec)
      mssql: numeric(decimal), float, real
      oracle:number, binary_float, binary_double,
3.3货币money
      sql-92:
   mysql:numeric(decimal),float,real
      mssql: money,smallmoney
      oracle:

4.逻辑型
      sql-92:
   mysql:bool(boolean)
      mssql: bit
      oracle:

5.日期型
      sql-92: date,time
   mysql:date,datetime,timestamp,time,year
      mssql: datetime,smalldatetime,timestamp
      oracle:timestamp, timestamp with time zone, timestamp with local time zone, interval year to month, interval day to second

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!