SQL中的五种数据类型


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

你可能感兴趣的:(数据类型)